When jQuery UI constrains tabbing it does not consider summary elements

Created on 7 March 2019, over 5 years ago
Updated 11 April 2023, over 1 year ago

Problem/Motivation

initially discovered here: #2977587-120: Improve block listing in Layout Builder by hiding uncommon block plugins β†’

When jQuery UI traps focus inside a dialog, it determines the first and last focusable element, and those become the tabbing constraints.
Unfortunately, it does not identify <details> elements as focusable unless the tag includes a tabindex attribute. This tabindex attribute should not be necessary.

In the dialog, if a <details> element is followed by an element that jQuery UI considers tabbable, then <details> will be tabbable since <details> is between the constraint boundaries.

To reproduce open a dialog with <details>elements that contain no focusable elements.

  • <details>elements that contain no focusable elements
  • No focusable elements appearing after <summary> or <details>

Proposed resolution

I submitted a PR that fixes the issue to jquery-ui https://github.com/jquery/jquery-ui/pull/1885.
If it is desirable to have this addressed before the fix is added to jquery-ui + that update is added to Drupal, this can be done. It would require overriding $.ui.focusable

Remaining tasks

Determine if its better to wait for the jquery-ui fix, or to override $.ui.focusable

User interface changes

Tabbing within a jQuery UI dialog will consistently include <details> without the need for them to be followed by other interactive elements.

API changes

NA

Data model changes

NA

Release notes snippet

NA

πŸ› Bug report
Status

Fixed

Version

10.1 ✨

Component
JavascriptΒ  β†’

Last updated about 4 hours ago

Created by

πŸ‡ΊπŸ‡ΈUnited States bnjmnm Ann Arbor, MI

Live updates comments and jobs are added and updated live.
  • Accessibility

    It affects the ability of people with disabilities or special needs (such as blindness or color-blindness) to use Drupal.

  • Blocks-Layouts

    Blocks and Layouts Initiative. See the #2811175 Add layouts to Drupal issue.

  • Field UX

    Usability improvements related to the Field UI

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024