Reconsider disabling ajax element triggers in beforeSend

Created on 12 February 2024, 19 days ago


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


API changes


Data model changes


Release notes snippet


πŸ› Bug report



11.0 πŸ”₯

AjaxΒ  β†’

Last updated about 9 hours 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.61.6-2-g546bc20