Added aria-label to things that are otherwise labelled in the UI.

This commit is contained in:
orangemug
2020-06-10 18:16:43 +01:00
parent 6c751fe1c4
commit bfada7cace
8 changed files with 33 additions and 18 deletions

View File

@@ -65,27 +65,30 @@ export default class FieldDynamicArray extends React.Component {
input = <InputUrl
value={v}
onChange={this.changeValue.bind(this, i)}
aria-label={this.props['aria-label'] || this.props.label}
/>
}
else if (this.props.type === 'number') {
input = <InputNumber
value={v}
onChange={this.changeValue.bind(this, i)}
aria-label={this.props['aria-label'] || this.props.label}
/>
}
else if (this.props.type === 'enum') {
const options = Object.keys(this.props.fieldSpec.values).map(v => [v, capitalize(v)]);
input = <InputEnum
options={options}
value={v}
onChange={this.changeValue.bind(this, i)}
aria-label={this.props['aria-label'] || this.props.label}
/>
}
else {
input = <InputString
value={v}
onChange={this.changeValue.bind(this, i)}
aria-label={this.props['aria-label'] || this.props.label}
/>
}