question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RadioButtons control does not support keyboard navigation in XAML islands

See original GitHub issue

Describe the bug

The RadioButtons control (which is used to group multiple radio button controls together allows navigation as follows-

  • Pressing tab into the radio buttons control should bring focus to the selected radio button. If no radio button is selected, pressing tab should bring focus to the first radio button.
  • Pressing tab again takes focus out of the radio buttons control. However, to navigate within the radio buttons, the arrow keys are used. This is the built in expected behavior.

However, when the radio buttons control is used within XAML islands, pressing tab always takes the focus to the first item (not to the selected item). Keyboard navigation does not work.

Steps to reproduce the bug

Steps to reproduce the behavior:

  1. Try to tab navigate and arrow navigate in this user control within a XAML island. The keyboard navigation does not work as expected.
<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>
            <RadioButton>Item 1</RadioButton>
            <RadioButton>Item 2</RadioButton>
            <RadioButton>Item 3</RadioButton>
        </muxc:RadioButtons>
    </Grid>
</UserControl>

Expected behavior

image

Screenshots

However, this navigation does not work within a XAML island.

Version Info

NuGet package version:

Microsoft.UI.Xaml.2.5.0-prerelease.200708003

Windows app type: UWP app within a XAML Island.

UWP Win32
Yes
Windows 10 version Saw the problem?
Insider Build (xxxxx)
May 2020 Update (19041)
November 2019 Update (18363) Yes
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 Page - https://github.com/microsoft/PowerToys/issues/6032

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:15 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
StephenLPeterscommented, Aug 21, 2020

@alekhyareddy28 could you please open a second issue for the narrator bug? 😃

1reaction
Felix-Devcommented, Aug 21, 2020

I am currently working on the RadioButtons control so I could take a look at this narrator issue as well while I’m at it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Guidelines for radio buttons - Windows apps
The RadioButtons control has special navigation behavior that helps keyboard users navigate the list more quickly and more easily. Keyboard ...
Read more >
RadioButtons Class (Microsoft.UI.Xaml.Controls) - WinUI
The RadioButtons control simplifies layout, handles keyboard navigation and accessibility, and supports binding to a data source. When you use RadioButtons, you ...
Read more >
WPF RadioButton groups in Xaml
In the WPF app we are building, we have 3 groups of RadioButtons in individual StackPanels side by side. We are trying to...
Read more >
Keyboard navigation problems, mostly at checkout
Generally speaking, a radio button is a grouped widget. And the tab key moves focus between radio button groups and other widgets, but...
Read more >
Uno support for user inputs
Uno support for user inputs. Supported user inputs. User inputs are usually propagated using RoutedEvents . See Uno's routed events documentation to better ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found