- Issue created by @mherchel
- πΊπΈUnited States katannshaw
I agree with mherchel β that when a user enters the mobile nav, keyboard focus must be trapped within it until the user:
* Selects the Close/OK/X button
* Selects the ESC key
* Clicks outside of the menu with their mouseHowever I disagree on the WCAG success criteria that this violates. I believe that this violates 2.1.2 No Keyboard Trap (Level A). Under an example in this SC titled "A modal dialog box", it mentions:
A Web application brings up a dialog box. At the bottom of the dialog are two buttons, Cancel and OK. When the dialog has been opened, focus is trapped within the dialog; tabbing from the last control in the dialog takes focus to the first control in the dialog. The dialog is dismissed by activating the Cancel button or the OK button.
The WCAG 2.4.7 Focus Visible (Level AA) SC refers to the visible focus indicator for focusable elements.
I like Mike's idea.
- π·πΈSerbia finnsky
Probably it is possible to merge that core/misc/focus-trap.js logic with existing arrow navigation:
https://git.drupalcode.org/project/drupal/-/blob/11.x/core/modules/navig...
Or move it on core level out of module.
- Status changed to Needs review
7 months ago 9:02pm 7 May 2024 - πΊπΈUnited States mherchel Gainesville, FL, US
Or move it on core level out of module.
Yeah, this is my thought. In the MR above, I abstracted it to be on the core level, and then make use of it in both navigation and olivero (to show that it can be used in multiple places).
- π·πΈSerbia finnsky
imo it should be possible to ignore desktop somehow.
- Status changed to Needs work
7 months ago 9:50pm 7 May 2024 - πΊπΈUnited States mherchel Gainesville, FL, US
imo it should be possible to ignore desktop somehow.
Yeah, that makes sense. Should be doable!
- π«π·France nod_ Lille
The existing tabbingmanager feature has tests, this one should too