Skip to content

Commit

Permalink
Expose 'Default' tag to Screen Readers in Color Schemes page
Browse files Browse the repository at this point in the history
  • Loading branch information
carlos-zamora committed May 30, 2023
1 parent c9e993a commit 2e64d93
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/cascadia/TerminalSettingsEditor/ColorSchemes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,16 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
_layoutUpdatedRevoker.revoke();

ColorSchemeListView().Focus(FocusState::Programmatic);

for (const auto scheme : _ViewModel.AllColorSchemes())
{
if (scheme.IsDefaultScheme())
{
winrt::hstring newName{ fmt::format(L"{} ({})", scheme.Name(), RS_(L"ColorScheme_DefaultTag/Text")) };
Automation::AutomationProperties::SetName(ColorSchemeListView().ContainerFromItem(scheme), newName);
break;
}
}
});
}

Expand Down
1 change: 1 addition & 0 deletions src/cascadia/TerminalSettingsEditor/ColorSchemes.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@
Visibility="{x:Bind IsDefaultScheme, Mode=OneWay}">
<TextBlock x:Uid="ColorScheme_DefaultTag"
Grid.Column="1"
AutomationProperties.AccessibilityView="Raw"
Foreground="{ThemeResource SystemControlForegroundBaseMediumBrush}" />
</Border>
</Grid>
Expand Down

0 comments on commit 2e64d93

Please sign in to comment.