Repository: microsoft/terminal (language: cpp)

Issue:
[Settings]: Screen Reader is not announcing name for 'Tab Title' edit field inside Startup page.
### Windows Terminal version

1.15.2003.0

### Windows build number

10.0.25179.1000

### Other Software

**Test Environment:**
OS: Window 11 22H2 OS Build 25179.1000
App: Windows Terminal Preview
AT: Narrator

### Steps to reproduce

**Repro Steps:**
1. Open Windows Terminal.
2. Open Narrator AT.
3. Inside Settings> Startup page, Expand Tab title control then navigate to Edit field control and observe the issue.

User Experience:
People with Visual impairments like Screen Reader will be impacted here as well as they might not be able to figure out edit field purpose.

Guideline Reference:
https://www.w3.org/WAI/WCAG21/Understanding/name-role-value

Attachments:
[Edit Tab Title.zip](https://github.com/microsoft/terminal/files/9401843/Edit.Tab.Title.zip)


### Expected Behavior

 Screen Reader should announce 'Edit Tab Title' for 'Tab Title' edit field inside Startup page.

### Actual Behavior

 Screen Reader is only announcing 'Edit' for 'Tab Title' edit field inside Startup page.

**Note Issue:** Same issue repro with Edit field which present inside 'Settings> Startup> Word delimiters' and 'Settings> Command Prompt> Name'.

Observation: 
Issue repro with JAWS and NVDA Screen Reader.
Screen Reader users might figure out name by its group control name. 


Discussion / hints:

Fix patch:
diff --git a/src/cascadia/TerminalSettingsEditor/SettingContainer.cpp b/src/cascadia/TerminalSettingsEditor/SettingContainer.cpp
index bd8e432911c..539165294c6 100644
--- a/src/cascadia/TerminalSettingsEditor/SettingContainer.cpp
+++ b/src/cascadia/TerminalSettingsEditor/SettingContainer.cpp
@@ -133,42 +133,45 @@ namespace winrt::Microsoft::Terminal::Settings::Editor::implementation
         _UpdateOverrideSystem();
 
         // Get the correct base to apply automation properties to
-        DependencyObject base{ nullptr };
+        std::vector<DependencyObject> base;
+        base.reserve(2);
         if (const auto& child{ GetTemplateChild(L"Expander") })
         {
             if (const auto& expander{ child.try_as<Microsoft::UI::Xaml::Controls::Expander>() })
             {
-                base = child;
+                base.push_back(child);
             }
         }
-        else if (const auto& content{ Content() })
+        if (const auto& content{ Content() })
         {
-            if (const auto& obj{ content.try_as<DependencyObject>() })
+            const auto& panel{ content.try_as<Controls::Panel>() };
+            const auto& obj{ content.try_as<DependencyObject>() };
+            if (!panel && obj)
             {
-                base = obj;
+                base.push_back(obj);
             }
         }
 
-        if (base)
+        for (const auto& obj : base)
         {
             // apply header as name (automation property)
             if (const auto& header{ Header() })
             {
                 if (const auto headerText{ header.try_as<hstring>() })
                 {
-                    Automation::AutomationProperties::SetName(base, *headerText);
+                    Automation::AutomationProperties::SetName(obj, *headerText);
                 }
             }
 
             // apply help text as tooltip and full description (automation property)
             if (const auto& helpText{ HelpText() }; !helpText.empty())
             {
-                Automation::AutomationProperties::SetFullDescription(base, helpText);
+                Automation::AutomationProperties::SetFullDescription(obj, helpText);
             }
             else
             {
-                Controls::ToolTipService::SetToolTip(base, nullptr);
-                Automation::AutomationProperties::SetFullDescription(base, L"");
+                Controls::ToolTipService::SetToolTip(obj, nullptr);
+                Automation::AutomationProperties::SetFullDescription(obj, L"");
             }
         }
 


Test patch: