-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add UIA HeadingLevel behaviour for Fabric architecture #15207
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
Conversation
We should align the property with aria-level. In fact the property is already there in the JS. Edit: Actually looks like the level property is already implemented end to end. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feature already exists as accessiblityLevel
#14593 is a PR for accessibilityLevel/aria-level, which uses UIA_LevelPropertyId for UIA clients. However, the grading team specifically raised concerns regarding the Heading Level, for which we should be using UIA_HeadingLevelPropertyId. https://learn.microsoft.com/en-us/windows/win32/winauto/uiauto-automation-element-propids To avoid confusion, I believe it would be better to have separate props for level and heading level. While we could consider making it a single property that supports multiple usages, my preference is to keep them distinct to ensure clarity and proper usage. |
@ksiler - Is headingLevel something we have done for win32? -- Is there a matching aria property we should be looking at hooking up? If it is a new property, we should probably make it a number to align with how aria-level works, rather than a string. |
We can use accessibilityLevel value for heading level , if accessibilityRole is set to heading. Your suggestion on this @acoates-ms ? https://learn.microsoft.com/en-us/windows/win32/winauto/uiauto-ariaspecification |
@vineethkuttan @acoates-ms the ability to set the UIA heading level works today by setting the role (or accessibilityRole) to "header" or "heading" and the aria-level (or accessibilityLevel) to the desired heading level. Both properties must be set in order for it to work. |
2fa5462
to
7e76849
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ksiler - you mind taking a look at this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* Add HeadingLevel Behaviour for Fabric Arch * format fix * function definition fix * Update Snapshot
* Add HeadingLevel Behaviour for Fabric Arch * format fix * function definition fix * Update Snapshot
…architecture (#15221) * Initial plan * Add UIA HeadingLevel behaviour for Fabric architecture (#15207) * Add HeadingLevel Behaviour for Fabric Arch * format fix * function definition fix * Update Snapshot --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Vineeth <66076509+vineethkuttan@users.noreply.github.com>
Description
Add UIA HeadingLevel behaviour for Fabric architecture which is particularly useful for identifying and interacting with elements that represent headings in a structured document or application interface.
Type of Change
Why
For identifying and interacting with elements that represent headings in a structured document or application interface.
Resolves [ microsoft/react-native-gallery/issues/699 ]
What
i)When role is set to heading the aria-level property will be considered as heading level
ii)Sent it to the UIA Clients , when it is requested
iii)Added tests to capture it in our test snapshot.
Testing
Added test cases in e2e tests.
Changelog
Should this change be included in the release notes: yes
Add a brief summary of the change to use in the release notes for the next release.
Implement accessibilityHeadingLevel for Fabric architecture
Microsoft Reviewers: Open in CodeFlow