[PR #18418] Make SUI previews readable by screen readers #31522

Open
opened 2026-01-31 09:47:47 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/18418

State: closed
Merged: Yes


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 as AccessibilityView=Raw to "remove" it from the UIA tree.
  • Added a CurrentValueAccessibleName property to the SettingContainer to expose the current value to the screen reader for SettingContainers that have expanders. Non-expander SetttingContainers already worked fine.
  • Applied CurrentValueAccessibleName to various settings throughout the settings UI for full coverage. Added a CurrentValue for the ones that were missing it.
  • Removed a redundant/hidden tab stop in 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 for SettingContainers 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.
    • Added a CurrentValueAccessibleName property
      • This specifically defines what should be read out by the screen reader, similar to AutomationProperties.Name
      • It updates automatically when CurrentValue changes.
      • It's applied on the inner Expander, if one exists.
      • The accessible name is constructed to be "<Header>: <CurrentValueAccessibleName>". If CurrentValueAccessibleName isn't provided, we try to use the CurrentValue if it's a string.
  • Profile (and appearance) settings:
    • Icon's value is now read out by a screen reader instead of staying silent. It'll read the icon path.
    • A redundant/hidden tab stop was removed from Icon.
    • TabTitle now displays/reads "None" if no tab title is set.
    • ColorScheme is now read out by a screen reader.
    • The color scheme overrides (i.e. Foreground, Background, SelectionBackground, and CursorColor) 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.

**Original Pull Request:** https://github.com/microsoft/terminal/pull/18418 **State:** closed **Merged:** Yes --- ## 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 as `AccessibilityView=Raw` to "remove" it from the UIA tree. - Added a `CurrentValueAccessibleName` property to the `SettingContainer` to expose the current value to the screen reader for `SettingContainer`s that have expanders. Non-expander `SetttingContainer`s already worked fine. - Applied `CurrentValueAccessibleName` to various settings throughout the settings UI for full coverage. Added a `CurrentValue` for the ones that were missing it. - Removed a redundant/hidden tab stop in `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` for `SettingContainer`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. - Added a `CurrentValueAccessibleName` property - This specifically defines what should be read out by the screen reader, similar to `AutomationProperties.Name` - It updates automatically when `CurrentValue` changes. - It's applied on the inner `Expander`, if one exists. - The accessible name is constructed to be `"<Header>: <CurrentValueAccessibleName>"`. If `CurrentValueAccessibleName` isn't provided, we try to use the `CurrentValue` if it's a string. - Profile (and appearance) settings: - `Icon`'s value is now read out by a screen reader instead of staying silent. It'll read the icon path. - A redundant/hidden tab stop was removed from `Icon`. - `TabTitle` now displays/reads "None" if no tab title is set. - `ColorScheme` is now read out by a screen reader. - The color scheme overrides (i.e. `Foreground`, `Background`, `SelectionBackground`, and `CursorColor`) are now read out by a screen reader. Format is "#<hex value>". - `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.
claunia added the pull-request label 2026-01-31 09:47:47 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#31522