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

SettingsCard narrator accessibility is not reliable #337

Open
3 of 24 tasks
Diegorro98 opened this issue Feb 15, 2024 · 5 comments
Open
3 of 24 tasks

SettingsCard narrator accessibility is not reliable #337

Diegorro98 opened this issue Feb 15, 2024 · 5 comments
Assignees
Labels
accessibility :accessibility: help wanted Extra attention is needed ux 🖌️ Everything design related

Comments

@Diegorro98
Copy link

Diegorro98 commented Feb 15, 2024

Describe the bug

When using the narrator on an app with SettingCards no clickable and with a controls in the content, the narrator behaves differently depending on the control used and if it is inside a Grid or a StackPanel (maybe there are other layouts also, but haven't tested)

Here it is an example of the different behaviors:

<StackPanel Spacing="4"
            AutomationProperties.Name="Accessibility Test">
    <controls:SettingsCard Description="When the ToggleSwitch is selected, the narrator will read 'Accessibility test group, ToggleSwitch SettingsCard, toggle switch off'. This control works right"
                            Header="ToggleSwitch SettingsCard"
                            HeaderIcon="{ui:FontIcon Glyph=&#xE713;}">
        <ToggleSwitch />
    </controls:SettingsCard>

    <controls:SettingsCard Description="When the ToggleSwitch is selected, the narrator will read 'Grid and ToggleSwitch SettingsCard group, toggle switch off', 'Accessibility Test group' is missing"
                            Header="Grid and ToggleSwitch SettingsCard"
                            HeaderIcon="{ui:FontIcon Glyph=&#xE713;}">
        <Grid>
            <ToggleSwitch />
        </Grid>
    </controls:SettingsCard>

    <controls:SettingsCard Description="When the ComboBox is selected, the narrator will read 'Accessibility Test group, ComboBox SettingsCard, option 1 ComboBox, collapsed'. This control works right"
                            Header="ComboBox SettingsCard"
                            HeaderIcon="{ui:FontIcon Glyph=&#xE713;}">
        <ComboBox SelectedIndex="0">
            <ComboBoxItem>Option 1</ComboBoxItem>
            <ComboBoxItem>Option 2</ComboBoxItem>
            <ComboBoxItem>Option 3</ComboBoxItem>
        </ComboBox>
    </controls:SettingsCard>

    <controls:SettingsCard Description="When the ComboBox is selected, the narrator will read 'Grid and ComboBox SettingsCard, option 1 ComboBox, collapsed', 'Accessibility Test group' is missing"
                            Header="Grid and ComboBox SettingsCard"
                            HeaderIcon="{ui:FontIcon Glyph=&#xE713;}">
        <Grid>
            <ComboBox SelectedIndex="0">
                <ComboBoxItem>Option 1</ComboBoxItem>
                <ComboBoxItem>Option 2</ComboBoxItem>
                <ComboBoxItem>Option 3</ComboBoxItem>
            </ComboBox>
        </Grid>
    </controls:SettingsCard>

    <controls:SettingsCard Description="When the Button is selected, the narrator will read 'Content button', 'Accessibility Test group' and 'Button SettingsCard' are missing"
                            Header="Button SettingsCard"
                            HeaderIcon="{ui:FontIcon Glyph=&#xE713;}">
        <Button Content="Content"/>
    </controls:SettingsCard>
    
    <controls:SettingsCard Description="When the Button is selected, the narrator will read 'Grid and Button SettingsCard group, Content button', 'Accessibility Test group' is missing"
                            Header="Grid and Button SettingsCard"
                            HeaderIcon="{ui:FontIcon Glyph=&#xE713;}">
        <Grid>
            <Button Content="Content"/>
        </Grid>
    </controls:SettingsCard>
</StackPanel>

Steps to reproduce

1. Create a new project and set the above example as the content of the page.
2. Open the narrator and select the controls to see how the narrator behaves with the different controls.

Expected behavior

All the narrator outputs should be equal to the ToggleSwitch/ComoBox SettingsCard narrator output

Screenshots

No response

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

Windows 11 23H2 (Build 22635.3140) (Insider build)

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

Windows 11, version 23H2 (Build 22621)

Visual Studio Version

2022

Visual Studio Build Number

17.9.0

Device form factor

Desktop

Additional context

No response

Help us help you

I would like to help, but I don't have too much experience with accessibility

@Arlodotexe Arlodotexe moved this to 📋 Backlog in Toolkit 8.x Mar 25, 2024
@Arlodotexe Arlodotexe moved this from 📋 Backlog to 🔖 Ready in Toolkit 8.x Apr 4, 2024
@Arlodotexe Arlodotexe changed the title SettingsCard accessibility is not reliable SettingsCard narrator accessibility is not reliable Apr 4, 2024
@Arlodotexe Arlodotexe moved this from 🔖 Ready to 📋 Backlog in Toolkit 8.x Apr 4, 2024
@michael-hawker michael-hawker added ux 🖌️ Everything design related accessibility :accessibility: labels Apr 4, 2024
@niels9001
Copy link
Collaborator

Apologies for the delayed response. @Diegorro98 Could you try the latest release to see if that resolves the issue, we fixed some a11y thinks in: #284?

@Diegorro98
Copy link
Author

@niels9001 I found this issue with the latest release, all NuGets on my project are up to date.

@niels9001
Copy link
Collaborator

Looking at your XAML, I think the expected thing is happening when having a single UI control as the content of the SettingsCard.

When wrapping things in a Grid things break, but I'm guessing that is to be expected as it's custom content living there in a panel. I guess you'd need to set the AutomationProperties.Name on the `Grid itself. Would love to hear your thoughts though!

@Diegorro98
Copy link
Author

@niels9001 Setting the AutomationProperties.Name to the Grid doesn't work because Narrator says the names in the incorrect order. Check this representation:

Without grid:

  • Accessibility test group
    • ToggleSwitch SettingsCard
      • toggle switch off

With Grid:

  • ToggleSwitch SettingsCard
    • toggle switch off

With Grid and AutomationProperties.Name:

  • ToggleSwitch SettingsCard
    • Accessibility test group
      • toggle switch off

@Diegorro98
Copy link
Author

Also, maybe it is kind of hidden between all the Grid issues, but buttons inside SettingsCards have a huge issue, I'm going to highlight it here so it can be seen easily:

    <controls:SettingsCard Description="When the Button is selected, the narrator will read 'Content button', 'Accessibility Test group' and 'Button SettingsCard' are missing"
                            Header="Button SettingsCard"
                            HeaderIcon="{ui:FontIcon Glyph=&#xE713;}">
        <Button Content="Content"/>
    </controls:SettingsCard>

@Arlodotexe Arlodotexe added the help wanted Extra attention is needed label Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accessibility :accessibility: help wanted Extra attention is needed ux 🖌️ Everything design related
Projects
Status: 📋 Backlog
Development

No branches or pull requests

4 participants