TapGestureRecognizer Controls Not Selectable with Physical Keyboard
- Dominant language
- C#
- Stars
- 23.3k
- Forks
- 2k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 306
Description
### Description
Exact same issue as #30685 except on windows / WinUI.
> Controls utilizing the TapGestureRecognizer in .NET MAUI are currently not selectable via a physical keyboard, which presents a challenge in adhering to the European Accessibility Act (EAA). The workaround involves placing a transparent button over these controls, but this leads to additional complications such as needing to apply separate alt-texts to both the overlay button and the underlying control.
>
> This issue affects accessibility compliance and introduces additional complexity to the UI design. Any insights or updates on this issue would be greatly appreciated. Ensuring seamless keyboard accessibility is crucial for compliance with accessibility standards.
>
> Thank you for your attention to this matter.
### Steps to Reproduce
> 1. Create a .NET MAUI project.
> 2. Add a control (e.g., Image, Label) and apply a TapGestureRecognizer to it.
> 3. Attempt to navigate and select the control using a physical keyboard.
>
> Expected Behavior: The control with TapGestureRecognizer should be navigable and selectable using a physical keyboard, ensuring compliance with the EAA.
> Actual Behavior: The control is not selectable with a physical keyboard, necessitating the use of a transparent overlay button for keyboard accessibility.
### Link to public reproduction project repository
_No response_
### Version with bug
10.0.50
### Is this a regression from previous behavior?
Not sure, did not test other versions
### Last version that worked well
Unknown/Other
### Affected platforms
Windows
### Affected platform versions
Windows 11 25H2
### Did you find any workaround?
> **Workaround:**
>
> Place a transparent button over the control with TapGestureRecognizer.
> Apply alt-text to both the overlay button and the underlying control.
>
> **Issues with Workaround:**
>
> Duplication of alt-text on both elements.
> Possible interference with the intended functionality of the underlying control.
### Relevant log output
```shell
```
Contributor guide
Research direction
Start by reproducing the issue in a .NET MAUI project on Windows 11 with an Image or Label using TapGestureRecognizer, then inspect how keyboard navigation and selection behave. Done means the control can be navigated to and selected with a physical keyboard without a transparent overlay button.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- accessibility, desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100