Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 292485

Convey AJAX progress messages to assistive technology.

$
0
0

Problem/Motivation

The AJAX API has a feature to display a progress message, but it isn't conveyed to assisitive tech like screen readers.

'#ajax' => array(
  'callback' => 'Drupal\config_translation\FormElement\DateFormat::ajaxSample',
  'event' => 'keyup',
  'progress' => array(
    'type' => 'throbber',
    'message' => t('Loading more products'),
  ),
),

Proposed resolution

Find a way to convey the progress message to
Possibilities (use one approach only, not both):

  1. Mark the visible AJAX message as an ARIA-live region (preferred?), or
  2. Duplicate the visible message using a Drupal.announce() call.

Other possibilities might be to provide incrementally updated messages, like "Updating... 30%... 80%... finished".

Remaining tasks

tbd.

User interface changes

No visual changes. Format the AJAX message so it is conveyed to assistive technology, e.g. so screen readers can announce it.

API changes

TBD. Maybe we always treat the message as an aria-live region, or maybe we make it an additional option.

Data model changes

TBD.

Background reading

Commit credits

@bgrobertson, who reported this issue on the #accessibility channel on Drupal Slack, and researched which bits of the AJAX API were relevant. This issue report is a summary of his comments there.
@ckueda, who provided a patch on the duplicate issue #2907132: Indicate ajax throbber activity to assistive technology, which is broadly similar to the earliest patch here.


Viewing all articles
Browse latest Browse all 292485

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>