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

Updated accessibilityRole and accessibilityLevel logic for different heading level announcements #11885

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

YajurG
Copy link
Contributor

@YajurG YajurG commented Jul 12, 2023

Description

Changed logic to accessibilityRole and accessibilityLevel property checks so that value of heading level property is set via accessibilityLevel prop rather than defaulting to setting 'heading, level 2'.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)

Why

What is the motivation for this change? Add a few sentences describing the context and overall goals of the pull request's commits.

Resolves #11847

What

Removed logic from 'accessibilityRole' check that sets heading level to level 2 by default, and added check for the 'accessibilityLevel' prop to set level based on prop value.

Screenshots

N/A

Testing

Tested on playground with a basic <Text> component as a header and checked Narrator announcement.

Component tested on:

<View
  accessible={true} accessibilityLevel={4}>
  <Text accessibilityRole='header' accessibilityLevel={1}>This is text</Text>
</View>
Microsoft Reviewers: codeflow:open?pullrequest=https://github.com/microsoft/react-native-windows/pull/11885&drop=dogfoodAlpha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add different heading level announcements for Narrator for different types of Headings
1 participant