CommunityToolkit / CommunityToolkit/Maui
[BUG] Popup V2 - Accessibility/Keyboard setup
- Dominant language
- C#
- Stars
- 2.7k
- Forks
- 500
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 7
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues
### Did you read the "Reporting a bug" section on Contributing file?
- [x] I have read the "Reporting a bug" section on Contributing file: https://github.com/CommunityToolkit/Maui/blob/main/CONTRIBUTING.md#reporting-a-bug
### Current Behavior
1. Escape key is not working. I think it should close popup only when `CanBeDismissedByTappingOutsideOfPopup` is set to true (or maybe we can use new property)
2. Tab/Shift+Tab keys are working everywhere when Popup is opened
3. On Windows, Narrator is working in whole Window when Popup is opened (Voice Over works well on Mac, it stays in popup)
### Expected Behavior
1. Escape key should close popup when `CanBeDismissedByTappingOutsideOfPopup` is set to true, or when similar property is set to true
2. Tab/Shift+Tab keys should be only available in content of Popup when Popup is opened. Additionally it should focus on first focusable element
3. Narrator should be available inside popup only (propably it should also have access to Window handle like VO in MacOS)
### Steps To Reproduce
1. Open and run official samples solution
2. Go to popup
3. Observe unexpected behavior
For Mac, it might be needed to enable keyboard support in system
### Link to public reproduction project repository
https://github.com/CommunityToolkit/Maui/tree/9f16c1cbe2aaf997d84826e21cec982c102f21e9/samples/CommunityToolkit.Maui.Sample/Views/Popups
### Environment
```markdown
- .NET MAUI CommunityToolkit: 12.1.0
- OS: Windows 11, Mac OS 14.7.1
- .NET MAUI: 9.0.90
```
### Anything else?
Hi,
I've some issues with accessibility/keyboard navigation connected with new popup v2.
Problem occurs on Windows and MacCatalyst and it can be reproducced on desktop using official samples.
This behaviour is actually a regression, when you compare with previous Popup version which was more native.
Contributor guide
Research direction
Run the official samples solution and reproduce the behavior in samples/CommunityToolkit.Maui.Sample/Views/Popups on Windows and MacCatalyst. Compare Popup V2 with the previous Popup behavior, focusing on Escape dismissal, Tab/Shift+Tab focus, and Narrator or VoiceOver scope. Done means the popup traps keyboard and screen-reader interaction as described while open.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- accessibility, desktop-dev, mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100