Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Labels accessibility for ArrayWidget,SelectWidget,TokenWidget #6332

Merged
merged 3 commits into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/volto/news/6332.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Labels accessibility for ArrayWidget, SelectWidget, TokenWidget. @folix-01
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ class ArrayWidget extends Component {
// small fix for https:/clauderic/react-sortable-hoc/pull/352:
getHelperDimensions={({ node }) => node.getBoundingClientRect()}
id={`field-${this.props.id}`}
aria-labelledby={`fieldset-${this.props.fieldSet}-field-label-${this.props.id}`}
key={this.props.id}
isDisabled={this.props.disabled || this.props.isDisabled}
className="react-select-container"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ class SelectWidget extends Component {
id={`field-${id}`}
key={choices}
name={id}
aria-labelledby={`fieldset-${this.props.fieldSet}-field-label-${id}`}
menuShouldScrollIntoView={false}
isDisabled={disabled}
isSearchable={true}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ class TokenWidget extends Component {
<FormFieldWrapper {...this.props}>
<CreatableSelect
id={`field-${this.props.id}`}
aria-labelledby={`fieldset-${this.props.fieldSet}-field-label-${this.props.id}`}
key={this.props.id}
menuShouldScrollIntoView={false}
isDisabled={this.props.isDisabled}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ exports[`No 'No value' option when default value is 0 1`] = `
>
<input
aria-autocomplete="list"
aria-labelledby="fieldset-default-field-label-my-field"
autocapitalize="none"
autocomplete="off"
autocorrect="off"
Expand Down Expand Up @@ -212,6 +213,7 @@ exports[`renders an array widget component 1`] = `
>
<input
aria-autocomplete="list"
aria-labelledby="fieldset-default-field-label-my-field"
autoCapitalize="none"
autoComplete="off"
autoCorrect="off"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ exports[`No 'No value' option when default value is 0 1`] = `
>
<input
aria-autocomplete="list"
aria-labelledby="fieldset-default-field-label-my-field"
autocapitalize="none"
autocomplete="off"
autocorrect="off"
Expand Down Expand Up @@ -222,6 +223,7 @@ exports[`renders a select widget component 1`] = `
>
<input
aria-autocomplete="list"
aria-labelledby="fieldset-default-field-label-my-field"
autocapitalize="none"
autocomplete="off"
autocorrect="off"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ exports[`renders a token widget component 1`] = `
>
<input
aria-autocomplete="list"
aria-labelledby="fieldset-default-field-label-my-field"
autoCapitalize="none"
autoComplete="off"
autoCorrect="off"
Expand Down
Loading