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 3c2c328
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
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
3 changes: 2 additions & 1 deletion src/cascadia/TerminalSettingsEditor/ColorSchemes.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,8 @@
Visibility="{x:Bind IsDefaultScheme, Mode=OneWay}">
<TextBlock x:Uid="ColorScheme_DefaultTag"
Grid.Column="1"
Foreground="{ThemeResource SystemControlForegroundBaseMediumBrush}" />
Foreground="{ThemeResource SystemControlForegroundBaseMediumBrush}"
AutomationProperties.AccessibilityView="Raw"/>
</Border>
</Grid>
</DataTemplate>
Expand Down

0 comments on commit 3c2c328

Please sign in to comment.