From dd2f92d8df6c5d8ab72e69a77668f0017c0358cf Mon Sep 17 00:00:00 2001 From: Roman Kysil Date: Thu, 26 Sep 2024 15:40:33 +0200 Subject: [PATCH] Squash commits --- packages/volto/news/6332.bugfix | 1 + packages/volto/src/components/manage/Widgets/ArrayWidget.jsx | 1 + packages/volto/src/components/manage/Widgets/SelectWidget.jsx | 1 + packages/volto/src/components/manage/Widgets/TokenWidget.jsx | 1 + .../manage/Widgets/__snapshots__/ArrayWidget.test.jsx.snap | 2 ++ .../manage/Widgets/__snapshots__/SelectWidget.test.jsx.snap | 2 ++ .../manage/Widgets/__snapshots__/TokenWidget.test.jsx.snap | 1 + 7 files changed, 9 insertions(+) create mode 100644 packages/volto/news/6332.bugfix diff --git a/packages/volto/news/6332.bugfix b/packages/volto/news/6332.bugfix new file mode 100644 index 0000000000..0ecdf868c3 --- /dev/null +++ b/packages/volto/news/6332.bugfix @@ -0,0 +1 @@ +Labels accessibility for ArrayWidget,SelectWidget,TokenWidget diff --git a/packages/volto/src/components/manage/Widgets/ArrayWidget.jsx b/packages/volto/src/components/manage/Widgets/ArrayWidget.jsx index 2670cc84bc..dc361195b3 100644 --- a/packages/volto/src/components/manage/Widgets/ArrayWidget.jsx +++ b/packages/volto/src/components/manage/Widgets/ArrayWidget.jsx @@ -314,6 +314,7 @@ class ArrayWidget extends Component { // small fix for https://github.com/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" diff --git a/packages/volto/src/components/manage/Widgets/SelectWidget.jsx b/packages/volto/src/components/manage/Widgets/SelectWidget.jsx index 64b0cdea69..0c9d61e12f 100644 --- a/packages/volto/src/components/manage/Widgets/SelectWidget.jsx +++ b/packages/volto/src/components/manage/Widgets/SelectWidget.jsx @@ -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} diff --git a/packages/volto/src/components/manage/Widgets/TokenWidget.jsx b/packages/volto/src/components/manage/Widgets/TokenWidget.jsx index b38de6897d..cad1f0bdcb 100644 --- a/packages/volto/src/components/manage/Widgets/TokenWidget.jsx +++ b/packages/volto/src/components/manage/Widgets/TokenWidget.jsx @@ -173,6 +173,7 @@ class TokenWidget extends Component {