Skip to content

Commit

Permalink
fix: do not declare aria-hidden=true inside of components
Browse files Browse the repository at this point in the history
  • Loading branch information
tujoworker committed May 27, 2019
1 parent 8a27802 commit 5647bf4
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 11 deletions.
1 change: 0 additions & 1 deletion packages/dnb-ui-lib/src/components/checkbox/Checkbox.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ export default class Checkbox extends Component {
<FormLabel
id={id + '-label'}
for_id={id}
aria-hidden
text={label}
disabled={disabled}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ exports[`Checkbox component have to match snapshot 1`] = `
value="value"
>
<FormLabel
aria-hidden={true}
class={null}
className={null}
disabled="disabled"
Expand Down
7 changes: 1 addition & 6 deletions packages/dnb-ui-lib/src/components/dropdown/Dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -683,12 +683,7 @@ export default class Dropdown extends Component {
return (
<>
{label && (
<FormLabel
aria-hidden
for_id={id}
text={label}
disabled={disabled}
/>
<FormLabel for_id={id} text={label} disabled={disabled} />
)}
<span className={classes} ref={this._ref}>
<span className="dnb-dropdown__shell">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ exports[`Dropdown component have to match snapshot 1`] = `
title="title"
>
<FormLabel
aria-hidden={true}
class={null}
className={null}
disabled="disabled"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ exports[`Radio component have to match snapshot 1`] = `
>
<label
aria-disabled={true}
aria-hidden={true}
className="dnb-form-label"
disabled="disabled"
htmlFor="id"
Expand Down
1 change: 0 additions & 1 deletion packages/dnb-ui-lib/src/components/switch/Switch.js
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ export default class Switch extends Component {
<FormLabel
id={id + '-label'}
for_id={id}
aria-hidden
text={label}
disabled={disabled}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ exports[`Switch component have to match snapshot 1`] = `
value="value"
>
<FormLabel
aria-hidden={true}
class={null}
className={null}
disabled="disabled"
Expand Down

0 comments on commit 5647bf4

Please sign in to comment.