-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fabric Text components use their text value as the accessibility name by default #12039
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
Text component falls back to the content if accessibleLabel isn't set
vnext/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp
Show resolved
Hide resolved
vnext/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp
Show resolved
Hide resolved
vnext/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp
Show resolved
Hide resolved
vnext/Microsoft.ReactNative/Fabric/Composition/CompositionViewComponentView.cpp
Show resolved
Hide resolved
|
Didn't see the PR. Left some comments on the commit itself. chrisglein@a58cc6d Can you add this PR to this issue #11901 in the "Name" row. And update status to In Progress? Can you also verify that you've tested the FastRefresh case? |
|
chiaramooney
left a comment
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.
👍 Looks good to me! The switch to turn on/off setting accessibilityRole is probably not needed for now, but would be a good thing to have once we move into adding functional testing for Fabric. So up to you if you have the time.
Description
Text components were showing in the accessibility tree but not with any value. This change has
UIA_NamePropertyIddefault to the text value but can be overriden byaccessibilityLabel.Type of Change
Why
Text components were showing in the accessibility tree but not with any value.
Resolves #12030
What
Added a virtual
DefaultAccessibleName()that enables individual Fabric components to provide a fallback ifaccessibilityLabelisn't specified. ThenParagraphComponentViewoverrides this to provide its string value.Screenshots
Add any relevant screen captures here from before or after your changes.
Testing
accessibilityLabelwas still respected if specified.Changelog
Yes? This is somewhere between bug fix (expected behavior not working) and feature (it wasn't working before).
Fabric Text components use their text value as the accessibility name by default (if
accessibilityLabelis not specifiedMicrosoft Reviewers: Open in CodeFlow