You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a SettingsCard's content is a button, it automatically sets its AutomationProperties.Name value to the button's content (as we can see here). This is not always desirable and can lead to some bugs with the narrator as the screenshots below shows.
In the SettingsCard, a simple workaround is to set the AutomationProperties.Name manually. But in the SettingsExpander, there is no way to change the behavior of its internal SettingsCard. This SettingCard then inherits the Content of the button, which in some cases may not even be a text (it is an icon in our case), and then the narrator when focusing the button, narrates it as the name of the group the button is in (in the case the button have an accessible name different than its content, which is also our case).
A current workaround for it is to put the button inside another control of different type, a StackPanel for example, but it has the cost of nesting one more group into the UI.
My suggestion is that the SettingsExpander's SettingsCard should not always use its button's content as accessible name, but either use the Title of the card or having the possibility of the developer to choose if want this behavior or not when using the control. Or maybe this internal SettingsCard should not have any accessible name at all.
Steps to reproduce
- Create a SettingsExpander.
- Set its content to be a button.
- Have the button to have a AutomationProperties.Name different from its content.
- Activate the narrator and focus the button.
Expected behavior
The narrator should say:
[Title of the SettingsExpander] group. [AutomationProperties.Name of the button] button.
Instead of:
[Content of the button] group. [AutomationProperties.Name of the button] button.
Screenshots
Code Platform
UWP
WinAppSDK / WinUI 3
Web Assembly (WASM)
Android
iOS
MacOS
Linux / GTK
Windows Build Number
Windows 10 1809 (Build 17763)
Windows 10 1903 (Build 18362)
Windows 10 1909 (Build 18363)
Windows 10 2004 (Build 19041)
Windows 10 20H2 (Build 19042)
Windows 10 21H1 (Build 19043)
Windows 10 21H2 (Build 19044)
Windows 10 22H2 (Build 19045)
Windows 11 21H2 (Build 22000)
Other (specify)
Other Windows Build number
No response
App minimum and target SDK version
Windows 10, version 1809 (Build 17763)
Windows 10, version 1903 (Build 18362)
Windows 10, version 1909 (Build 18363)
Windows 10, version 2004 (Build 19041)
Windows 10, version 2104 (Build 20348)
Windows 11, version 22H2 (Build 22000)
Other (specify)
Other SDK version
No response
Visual Studio Version
2022
Visual Studio Build Number
No response
Device form factor
Desktop
Additional context
No response
Help us help you
No, I'm unable to contribute a solution.
The text was updated successfully, but these errors were encountered:
Describe the bug
When a SettingsCard's content is a button, it automatically sets its
AutomationProperties.Name
value to the button's content (as we can see here). This is not always desirable and can lead to some bugs with the narrator as the screenshots below shows.In the SettingsCard, a simple workaround is to set the
AutomationProperties.Name
manually. But in the SettingsExpander, there is no way to change the behavior of its internal SettingsCard. This SettingCard then inherits the Content of the button, which in some cases may not even be a text (it is an icon in our case), and then the narrator when focusing the button, narrates it as the name of the group the button is in (in the case the button have an accessible name different than its content, which is also our case).A current workaround for it is to put the button inside another control of different type, a StackPanel for example, but it has the cost of nesting one more group into the UI.
My suggestion is that the SettingsExpander's SettingsCard should not always use its button's content as accessible name, but either use the Title of the card or having the possibility of the developer to choose if want this behavior or not when using the control. Or maybe this internal SettingsCard should not have any accessible name at all.
Steps to reproduce
Expected behavior
The narrator should say:
[Title of the SettingsExpander] group. [AutomationProperties.Name of the button] button.
Instead of:
[Content of the button] group. [AutomationProperties.Name of the button] button.
Screenshots
Code Platform
Windows Build Number
Other Windows Build number
No response
App minimum and target SDK version
Other SDK version
No response
Visual Studio Version
2022
Visual Studio Build Number
No response
Device form factor
Desktop
Additional context
No response
Help us help you
No, I'm unable to contribute a solution.
The text was updated successfully, but these errors were encountered: