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

Fix tile gallery link accessibility #489

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

Conversation

chrisglein
Copy link
Member

@chrisglein chrisglein commented Sep 9, 2024

Description

Fix some issues with the tile gallery links

Why

Resolves #446

What

Microsoft Reviewers: Open in CodeFlow

This avoids an auto concatenation, which will be wrong
Link type doesn't seem to set the invoke action, so use button instead
@chrisglein
Copy link
Member Author

@chiaramooney is there a way to get the InvokeAction to get set up while having the role type set to "link"? It works by default for "button" but not "link".
(this is on Paper, but I assume that with implementation in place the same question would stand for Fabric)

@chiaramooney
Copy link
Contributor

chiaramooney commented Sep 12, 2024

So specifying the "link" accessibilityRole type should map to the UIA control type Hyperlink which according to this source (https://learn.microsoft.com/en-us/windows/win32/winauto/uiauto-controlpatternmapping) should always support the invoke provider. I would confirm using Accessibility Insights if the correct UIA control type is being specified. If not, then our role to control type mapping on Paper has a bug. If the control type is Hyperlink but the invoke provider is not implemented then this is a bug on Paper with our UIA Provider code (something in DynamicAutomationProvider is wrong, potentially hyperlink is missing from the list of controls that should support invoke).

Since we are redoing our accessibility implementation from scratch on Fabric this issue should not be occurring on the new arch. See this line (https://github.com/microsoft/react-native-windows/blob/2c70908a390daa63060059fea373b4777f7d7b50/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp#L154C79-L154C106) where were create the IInvokeProvider if the role type is link.

@chrisglein
Copy link
Member Author

So specifying the "link" accessibilityRole type should map to the UIA control type Hyperlink which according to this source (https://learn.microsoft.com/en-us/windows/win32/winauto/uiauto-controlpatternmapping) should always support the invoke provider. I would confirm using Accessibility Insights if the correct UIA control type is being specified. If not, then our role to control type mapping on Paper has a bug. If the control type is Hyperlink but the invoke provider is not implemented then this is a bug on Paper with our UIA Provider code (something in DynamicAutomationProvider is wrong, potentially hyperlink is missing from the list of controls that should support invoke).

Since we are redoing our accessibility implementation from scratch on Fabric this issue should not be occurring on the new arch. See this line (https://github.com/microsoft/react-native-windows/blob/2c70908a390daa63060059fea373b4777f7d7b50/vnext/Microsoft.ReactNative/Fabric/Composition/CompositionDynamicAutomationProvider.cpp#L154C79-L154C106) where were create the IInvokeProvider if the role type is link.

Thanks Chiara, that's super helpful. I opened microsoft/react-native-windows#13861.

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