-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[A11y] Add SemanticProperties.Description to the Toolbar Icon #27119
Conversation
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.
Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (1)
src/Controls/src/Core/Compatibility/iOS/Extensions/AccessibilityExtensions.cs:90
- Ensure that the new behavior introduced by SemanticProperties.GetDescription is covered by tests.
Control.AccessibilityLabel = SemanticProperties.GetDescription(Element) ?? (string)Element.GetValue(AutomationProperties.NameProperty) ?? _defaultAccessibilityLabel;
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.
I'm thinking we should fix all of the methods in here to route the UpdateSemantics
implementations.
public static string SetAccessibilityLabel(this NativeView Control, Element Element, string _defaultAccessibilityLabel = null)
{
if (Element is IView view && view.Semantics != null)
{
Control.UpdateSemantics(view);
return String.Empty;
}
And then create an issue/comment to obsolete this code in NET10
Description of Change
In the this issue: #26816, our A11y folks pointed out that Toolbar.Items with IconImageSource set do not properly have a "Label" in the accessibility inspector on Mac. This is important because that label allows the VoiceControl and VoiceOver to work properly for that button.
In the examples below you can see the accessibility inspector on the right with the label set on the After and not the Before.
Before:
After:
Issues Fixed
Partially resolves: #26816