Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for UIA accessibility headings #8516

Merged

Conversation

AgneLukoseviciute
Copy link
Contributor

@AgneLukoseviciute AgneLukoseviciute commented Aug 31, 2021

When accessibilityRole is set to "header" in RN-core, the native values that are updated (Heading for Android and accessibilityTrait for iOS) are the same values that used by screen readers to determine if some text is a heading. On Windows, screen readers check the UIA Heading Level to determine if something is a heading -- this PR sets the UIA Heading Level to a default level 2 whenever accessibilityRole="header" in Text. This will match the behavior in RN-core, although we might want to create a windows-specific prop down the road to allow for control over the exact heading level passed to UIA.

Also included is an update to automationProperties.localizedControlTypeProperty when setting accessibilityRole in Text as a slight improvement for #8191 until we decide on a workaround for custom automation peer functionality for Text.

Testing: Tested using Narrator and Accessibility Insights For Windows. When accessibilityRole="header" is set on a Text component Narrator Scan mode announces the heading as expected and Accessibility Insights shows the localizedControlTypeProperty as "header".

Microsoft Reviewers: Open in CodeFlow

@AgneLukoseviciute AgneLukoseviciute requested review from jonthysell and a team August 31, 2021 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants