From 6c677a50635f7a37b08895aa57212b268b2296a9 Mon Sep 17 00:00:00 2001 From: Siobhan Date: Thu, 12 May 2022 20:00:51 +0100 Subject: [PATCH 1/3] Enable control's label to be read by screen reader --- .../mobile/bottom-sheet-select-control/index.native.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/components/src/mobile/bottom-sheet-select-control/index.native.js b/packages/components/src/mobile/bottom-sheet-select-control/index.native.js index 6d88c349b7834..cc0a340104f86 100644 --- a/packages/components/src/mobile/bottom-sheet-select-control/index.native.js +++ b/packages/components/src/mobile/bottom-sheet-select-control/index.native.js @@ -57,11 +57,16 @@ const BottomSheetSelectControl = ( { value={ selectedOption.label } onPress={ openSubSheet } accessibilityRole={ 'button' } - accessibilityLabel={ selectedOption.label } + accessibilityLabel={ sprintf( + // translators: %1$s: Select control button label e.g. "Button width". %2$s: Select control option value e.g: "Auto, 25%". + __( '%1$s. Currently selected: %2$s' ), + label, + selectedOption.label + ) } accessibilityHint={ sprintf( // translators: %s: Select control button label e.g. "Button width" __( 'Navigates to select %s' ), - selectedOption.label + label ) } > From 16ac9ad99e810a64a4007f65740493c68fba0062 Mon Sep 17 00:00:00 2001 From: Siobhan Date: Thu, 12 May 2022 20:06:24 +0100 Subject: [PATCH 2/3] Update CHANGELOG --- packages/react-native-editor/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/react-native-editor/CHANGELOG.md b/packages/react-native-editor/CHANGELOG.md index 34b2157e09f90..af0dff8c08127 100644 --- a/packages/react-native-editor/CHANGELOG.md +++ b/packages/react-native-editor/CHANGELOG.md @@ -11,6 +11,7 @@ For each user feature we should also add a importance categorization label to i ## Unreleased +- [*] [a11y] Ensure text read by screenreaders clearly describes BottomSheet text controls [#41036] ## 1.76.0 From 4f9fd30a8ff57c7224c4d168ef42eda8a5972ff8 Mon Sep 17 00:00:00 2001 From: Siobhan Date: Thu, 12 May 2022 21:01:52 +0100 Subject: [PATCH 3/3] Update CHANGELOG for clarity --- packages/react-native-editor/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-native-editor/CHANGELOG.md b/packages/react-native-editor/CHANGELOG.md index af0dff8c08127..137beeddf4d8f 100644 --- a/packages/react-native-editor/CHANGELOG.md +++ b/packages/react-native-editor/CHANGELOG.md @@ -11,7 +11,7 @@ For each user feature we should also add a importance categorization label to i ## Unreleased -- [*] [a11y] Ensure text read by screenreaders clearly describes BottomSheet text controls [#41036] +- [*] [a11y] Improve text read by screen readers for BottomSheetSelectControl [#41036] ## 1.76.0