Repository navigation
fix(avalonia): expose accessible names on tab headers - #5656
Gabriel Dufresne (GabrielDuf) merged 2 commits into
Conversation
Screen readers announced the Installation options tabs as Avalonia.Controls.Border and the Operation history tabs as Avalonia.Controls.Grid / OperationHistoryLogView, because the custom headers are composed of an icon and text blocks with no automation name. Set AutomationProperties.Name on each TabItem from the visible tab label (General, Architecture, CLI, Close apps, Pre/Post install, History and Log). Fixes Devolutions#5655
|
Thanks for the quick fix! I noticed that the five Installation options tabs currently use only the first line of their visible headers for While this fixes the original issue of screen readers announcing internal Avalonia control class names, the second line sometimes contains important information rather than just a description. For example:
In particular, announcing only "Pre-install" could be misleading, since the tab also contains post-install options. Would it be possible to combine both existing localized strings into the accessible name of each tab? I noticed that other UniGetUI controls, such as This should not require any new translations or changes to the existing keyboard navigation. Thanks again for addressing this so quickly! |
The second header line often carries essential information (for example 'Pre-install — Post-install'), so announcing only the first line could be misleading. Combine both localized lines into the AutomationProperties.Name of each Installation options tab, matching the visible two-line headers.
|
Done in the follow-up commit: each tab's |
0fff03c
into
Devolutions:main
Fixes #5655
TL;DR
Avalonia.Controls.Borderand the Operation history tabs asAvalonia.Controls.Grid/OperationHistoryLogView: the tab headers are custom stacks (icon + text blocks) with no automation name, so UIA fell back to the template control class names.AutomationProperties.Nameon each of the five Installation optionsTabItems and the two Operation historyTabItems, bound to the same labels that are already visible on screen (TabGeneralLine1/TabLocationLine1/TabCLILine1/TabCloseAppsLine1/TabPrePostLine1, and{t:Translate History}/{t:Translate Log}), so the announced name always matches what sighted users see, including localized values.Verification
dotnet build src/UniGetUI.Avalonia/UniGetUI.Avalonia.csproj -c Releasesucceeds (0 errors) on Windows.