microsoft / react-native-windows

A framework for building native Windows apps with React.
https://microsoft.github.io/react-native-windows/
Other
16.1k stars 1.13k forks source link

Add different heading level announcements for Narrator for different types of Headings #11847

Closed YajurG closed 4 weeks ago

YajurG commented 12 months ago

Summary

Currently, there is only support for one type of 'header' announcement within narrator, as the accessibilityLabel prop only takes one type of 'header' property. Because of this, we are announing 'heading, level 2' for any Text component that has accessibilityLabel = 'header'. Ideally, we will have a different heading announcement in Narrator for different types of headings e.g the title of a page would have a different announcement than the sub-headings of sections on the same page.

Motivation

There is currently an issue on Gallery where different header announcements are needed for different types of headings. In the below example, 'Button' would be a different heading announcement from 'A simple button' or 'A colored button'. image Currently all headings have the same announcement - 'heading, level 2'.

Basic Example

No response

Open Questions

No response

AgneLukoseviciute commented 11 months ago

One option would be to add a windows-specific accessibilityLevel: number prop that would allow for customizing the value. This would be aligned with: https://github.com/react-native-community/discussions-and-proposals/blob/fd64774e8161973b87b8f0a27587fa039eb7b43b/proposals/0000-accessibility-apis.md

chrisglein commented 11 months ago

Maybe related: https://github.com/microsoft/react-native-windows/pull/11772 Check in with Andrew about what's done on Paper.

Yajur-Grover commented 4 weeks ago

This is no longer an accessibility issue, so marking as closed.