Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SettingsExpander's internal SettingsCard using its Button content's as AutomationProperties.Name #396

Open
2 of 24 tasks
guimafelipe opened this issue Apr 5, 2024 · 0 comments

Comments

@guimafelipe
Copy link

guimafelipe commented Apr 5, 2024

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

- 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

image
image

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants