From 639598f6f5ab6c884ee415200bea92915ab1f305 Mon Sep 17 00:00:00 2001 From: Siobhan Bamber Date: Fri, 13 May 2022 17:33:45 +0100 Subject: [PATCH] [RNMobile] Improve text read by screen readers for BottomSheetSelectControl (#41036) Improves the text that's read by screen readers by the BottomSheetSelectControl component, adding extra context and making its purpose clearer. --- .../mobile/bottom-sheet-select-control/index.native.js | 9 +++++++-- packages/react-native-editor/CHANGELOG.md | 4 ++++ 2 files changed, 11 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 ) } > diff --git a/packages/react-native-editor/CHANGELOG.md b/packages/react-native-editor/CHANGELOG.md index ac9774f601336..9b3a6cf719b56 100644 --- a/packages/react-native-editor/CHANGELOG.md +++ b/packages/react-native-editor/CHANGELOG.md @@ -11,6 +11,10 @@ For each user feature we should also add a importance categorization label to i ## Unreleased +## 1.77.0 + +- [*] [a11y] Improve text read by screen readers for BottomSheetSelectControl [#41036] + ## 1.76.1 - [*] BlockList - Add internal onLayout from CellRendererComponent to BlockListItemCell [#41105]