Repository: microsoft/terminal (language: cpp)

Issue:
[Color Schemes]: Screen reader does not announce the 'default' visible text defined with the 'Campbell' color scheme on the page.
### Windows Terminal version

1.17.3052.0

### Windows build number

Windows 11 Version 22H2 (OS Build 25206.1000)

### Other Software

_No response_

### Steps to reproduce

1. Open Windows Terminal.
2. Open 'Settings > Startup' window with 'Ctrl+,' keys.
3. Turn on Narrator by 'Ctrl+Win+Enter' keys.
4. Navigate to 'Color schemes' list item by down arrow key and select it.
5. Navigate to 'Campbel' by the tab key.
6. Observe the Narrator's announcement here.

**User Experience: -**
Screen reader users will have to navigate in scan mode to get this value information defined with the color control.

**Guideline Reference:**
(https://www.w3.org/WAI/WCAG21/Understanding/info-and-relationships.html)

**Attachments:**
[Screen reader does not announce the 'default' visible text defined with the 'Campbell' color scheme on the page..zip](https://github.com/microsoft/terminal/files/10028996/Screen.reader.does.not.announce.the.default.visible.text.defined.with.the.Campbell.color.scheme.on.the.page.zip)


### Expected Behavior

Screen reader should announce the 'default' visible text defined with the 'Campbell' color scheme on the page. It should announce as '_Campbell, default, 1 of 11 selected_'.

### Actual Behavior

Screen reader does not announce the 'default' visible text defined with the 'Campbell' color scheme on the page. It announces as '_Campbell, 1 of 11 selected_'.

**Observation:**

Issue also reproes with the NVDA screen reader.



Discussion / hints:
FWIW, this still repros on the current Color Schemes page, circa 1.17.3481.0
Reverted due to a virtualization-related crash in 7d0baa794 (main) ab79a8538 (release-1.17).
@DHowett Should we reopen this then? Or just file a new bug to track the crash?
Ha, I actually did mean to reopen it. Thanks!
:tada:This issue was addressed in #14704, which has now been successfully released as `Windows Terminal Preview v1.17.1023`.:tada:

Handy links:
* [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.17.1023)
* [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)

Fix patch:
diff --git a/src/cascadia/TerminalSettingsEditor/ColorSchemeViewModel.cpp b/src/cascadia/TerminalSettingsEditor/ColorSchemeViewModel.cpp
index 30fc1018e82..4bd995b6c4a 100644
--- a/src/cascadia/TerminalSettingsEditor/ColorSchemeViewModel.cpp
+++ b/src/cascadia/TerminalSettingsEditor/ColorSchemeViewModel.cpp
@@ -50,6 +50,18 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
         return _Name;
     }
 
+    // This is used in the ComboBox and ListView.
+    // It's the only way to expose the name of the inner UI item so the ComboBox can do quick search
+    //  and screen readers can read the item out loud.
+    winrt::hstring ColorSchemeViewModel::ToString()
+    {
+        if (IsDefaultScheme())
+        {
+            return hstring{ fmt::format(L"{0} ({1})", Name(), RS_(L"ColorScheme_DefaultTag/Text")) };
+        }
+        return Name();
+    }
+
     bool ColorSchemeViewModel::IsDefaultScheme()
     {
         const auto defaultAppearance = _settings.ProfileDefaults().DefaultAppearance();
diff --git a/src/cascadia/TerminalSettingsEditor/ColorSchemeViewModel.h b/src/cascadia/TerminalSettingsEditor/ColorSchemeViewModel.h
index 6adb823ec85..539b0636c3c 100644
--- a/src/cascadia/TerminalSettingsEditor/ColorSchemeViewModel.h
+++ b/src/cascadia/TerminalSettingsEditor/ColorSchemeViewModel.h
@@ -25,10 +25,7 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
 
         winrt::hstring Name();
         void Name(winrt::hstring newName);
-        hstring ToString()
-        {
-            return Name();
-        }
+        hstring ToString();
 
         bool RequestRename(winrt::hstring newName);
 
diff --git a/src/cascadia/TerminalSettingsEditor/ColorSchemes.h b/src/cascadia/TerminalSettingsEditor/ColorSchemes.h
index 63f755a6b26..9dbe211dbe7 100644
--- a/src/cascadia/TerminalSettingsEditor/ColorSchemes.h
+++ b/src/cascadia/TerminalSettingsEditor/ColorSchemes.h
@@ -20,7 +20,6 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
 
         void AddNew_Click(const winrt::Windows::Foundation::IInspectable& sender, const winrt::Windows::UI::Xaml::RoutedEventArgs& e);
         void ListView_PreviewKeyDown(const winrt::Windows::Foundation::IInspectable& sender, const winrt::Windows::UI::Xaml::Input::KeyRoutedEventArgs& e);
-        void ListView_SelectionChanged(const winrt::Windows::Foundation::IInspectable& sender, const winrt::Windows::UI::Xaml::Controls::SelectionChangedEventArgs& e);
 
         WINRT_PROPERTY(Model::ColorScheme, CurrentColorScheme, nullptr);
         WINRT_OBSERVABLE_PROPERTY(Editor::ColorSchemesPageViewModel, ViewModel, _PropertyChangedHandlers, nullptr);
diff --git a/src/cascadia/TerminalSettingsEditor/ColorSchemes.xaml b/src/cascadia/TerminalSettingsEditor/ColorSchemes.xaml
index 4478cde2aff..7d2fad0d4d7 100644
--- a/src/cascadia/TerminalSettingsEditor/ColorSchemes.xaml
+++ b/src/cascadia/TerminalSettingsEditor/ColorSchemes.xaml
@@ -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>


Test patch: