microsoft-ui-xaml: Screen reader does not read the heading of RadioButtons control

Describe the bug

Steps to reproduce the bug

Steps to reproduce the behavior:

  1. Create a radiobuttons control as follows
<UserControl
    x:Class="Microsoft.PowerToys.Settings.UI.Views.ShellPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:behaviors="using:Microsoft.PowerToys.Settings.UI.Behaviors"
    xmlns:winui="using:Microsoft.UI.Xaml.Controls"
    xmlns:helpers="using:Microsoft.PowerToys.Settings.UI.Helpers"
    xmlns:views="using:Microsoft.PowerToys.Settings.UI.Views"
    xmlns:ic="using:Microsoft.Xaml.Interactions.Core"
    xmlns:i="using:Microsoft.Xaml.Interactivity"
    xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
    mc:Ignorable="d">


    <Grid>
        <muxc:RadioButtons Header="abcd">
            <RadioButton>Item 1</RadioButton>
            <RadioButton>Item 2</RadioButton>
            <RadioButton>Item 3</RadioButton>
        </muxc:RadioButtons>
    </Grid>
</UserControl>

Expected behavior

When we tab into the radio button the narrator must read the heading as well as the radio button that is in focus. Eg: something along the lines of “abcd grouping Item 1 button 1 of 3”.

Actual Behavior

It just says “Item 1, 1 of 3”. It does not read out the heading set by the radiobuttons header. Setting an AutomationProperty does not fix the issue either.

Screenshots

Version Info

NuGet package version:

Microsoft.UI.Xaml.2.5.0-prerelease.200708003

Windows app type:

UWP Win32
Yes
Windows 10 version Saw the problem?
Insider Build (xxxxx)
May 2020 Update (19041)
November 2019 Update (18363)
May 2019 Update (18362) Yes
October 2018 Update (17763)
April 2018 Update (17134)
Fall Creators Update (16299)
Creators Update (15063)
Device form factor Saw the problem?
Desktop Yes
Xbox
Surface Hub
IoT

Additional context

Link to issue in the PowerToys repository - https://github.com/microsoft/PowerToys/issues/6032

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 23 (20 by maintainers)

Commits related to this issue

Most upvoted comments

Sounds good to me!

@crutkas I am not entirely sure I understand your comment. The workaround using the TextBlock would be WinUI internal so customers such as PowerToys would just see that the header is pronounced as expected when focusing the RadioButtons control. Once WinUI has a proper fix ready, the workaround would be removed in a new WinUI version and customers won’t notice any difference.

I agree with the sentiment expressed here though that we should strive to get this fixed without using such a workaround as other headered controls like the ComboBox also get the job done without it.

@chingucoding Sounds good to me though as I confessed some time ago, I am a novice to all things UIA considered so I will likely take some time tomorrow to read up more on this.

I don’t see anything else that might affect it in ComboBox. I do notice that in the case of ComboBox, ComboBox can take focus, so that might be when Narrator is reading it out. Following up with accessibility folks.

@ranjeshj I will take a look if that will work here as well (I faintly recall I tried that a few days ago to no avail but perhaps I missed something).