react-native-windows icon indicating copy to clipboard operation
react-native-windows copied to clipboard

Exposing accessibility prop for access keys

Open rurikoaraki opened this issue 1 year ago • 1 comments

Summary

Add a prop to set the access key UIA property on a component.

Motivation

RN Win32 is working on a feature which requires exposing a prop to add access key accessibility information to a component. Guidance from https://github.com/microsoft/react-native-windows/issues/3450 mentions using accessibilityHint to set the property, but we've found that accessibilityHint doesn't consistently get explicitly announced by Narrator for certain control types like MenuItems (see here). So, we will be going with exposing a prop to set the UIA AccessKey property.

Opening this issue to revisit this guidance for RNW and discuss if proper support for access key accessibility should be added. It would be good to have consistency across platforms for exposing accessibility information.

Basic Example

<View focusable accessible onKeyDown={handleAccessKey()} accessibilityAccessKey={'A'}>
    <Text>Test</Text>
</View>

Open Questions

Should accelerator key accessibility also be considered?

rurikoaraki avatar Aug 01 '22 15:08 rurikoaraki

For XAML this would likely map to AccessKey

chrisglein avatar Aug 01 '22 18:08 chrisglein