Skip to content

Commit

Permalink
a11y: don't pass id not necesserilly
Browse files Browse the repository at this point in the history
  • Loading branch information
mbondyra committed Feb 22, 2020
1 parent e5802f7 commit ad5834e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 46 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -299,10 +299,14 @@ export class Field extends PureComponent<FieldProps> {
defVal,
ariaName,
} = setting;
const a11yProps: { [key: string]: string } = {
['aria-label']: ariaName,
['aria-describedby']: id,
};
const a11yProps: { [key: string]: string } = unsavedChanges
? {
['aria-label']: ariaName,
['aria-describedby']: id,
}
: {
['aria-label']: ariaName,
};
const currentValue = unsavedChanges
? unsavedChanges.value
: getEditableValue(type, value, defVal);
Expand Down

0 comments on commit ad5834e

Please sign in to comment.