Make SUI previews readable by screen readers #18418
Open
+156
−11
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary of the Pull Request
Fixes a few accessibility bugs in the SettingContainer previews. Main changes include:
SettingContainer
was considered a separate UIA element from the inner expander. It's been marked asAccessibilityView=Raw
to "remove" it from the UIA tree.CurrentValueAccessibleName
property to theSettingContainer
to expose the current value to the screen reader forSettingContainer
s that have expanders. Non-expanderSetttingContainer
s already worked fine.CurrentValueAccessibleName
to various settings throughout the settings UI for full coverage. Added aCurrentValue
for the ones that were missing it.Icon
References and Relevant Issues
Padding
was not updated since #18300 is handling that. This'll just automatically make it accessible.Font axes and features weren't updated to show previews, but I'm happy to do it if given a suggestion.
Part of #18318
Detailed Description of the Pull Request / Additional comments
SettingContainer
updates:AccessibilityView = Raw
forSettingContainer
s with expanders. This is because the expander itself is the one we care about. No need to have another layer of UIA objects saying it's a group.CurrentValueAccessibleName
propertyAutomationProperties.Name
CurrentValue
changes.Expander
, if one exists."<Header>: <CurrentValueAccessibleName>"
. IfCurrentValueAccessibleName
isn't provided, we try to use theCurrentValue
if it's a string.Icon
's value is now read out by a screen reader instead of staying silent. It'll read the icon path.Icon
.TabTitle
now displays/reads "None" if no tab title is set.ColorScheme
is now read out by a screen reader.Foreground
,Background
,SelectionBackground
, andCursorColor
) are now read out by a screen reader. Format is "#".BackgroundImageAlignment
is now displayed and read out by a screen reader.LaunchSize
is now displayed and read out by a screen reader. Format is "Width x Height".Validation Steps Performed
Tabbed through the settings UI with a screen reader. Each of these settings now reads out a preview.