Reconsider disabling ajax element triggers in beforeSend

Created on 12 February 2024, 10 months ago

Problem/Motivation

Whenever an element is an AJAX trigger, Drupal.Ajax.prototype.beforeSend applies the disabled HTML attribute to it.

This may prove to be troublesome for some keyboard users in certain form configurations, as these elements become non-interactive.

Steps to reproduce

  1. Set up a form with a text field that triggers a long-running AJAX request on blur and a submit button
  2. Tab to the text field
  3. Fill out the text field
  4. Tab to the submit button
  5. Press shift+tab before the AJAX request has completed. Notice that focus is now outside of the form entirely, as disabled elements cannot receive focus.

Proposed resolution

Might it be more appropriate to apply aria-disabled here instead and to prevent value changes in another way?

Remaining tasks

  • See if this is even something to consider (calling all a11y maintainers!)
  • See if this is even feasible due to b/c concerns.
  • Do it(?)

User interface changes

None

API changes

None

Data model changes

None

Release notes snippet

TBD

πŸ› Bug report
Status

Active

Version

11.0 πŸ”₯

Component
AjaxΒ  β†’

Last updated about 1 hour ago

Created by

πŸ‡ΊπŸ‡ΈUnited States luke.leber Pennsylvania

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.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024