Skip to content
Snippets Groups Projects

Convey AJAX progress messages to assistive technology. - #2973140

3 unresolved threads

Closes #2973140

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
435 435 schemaapi
436 436 schemeless
437 437 scorewords
438 screenreaders
  • 424 424 }
    425 425
    426 // Set default values for progress' screen reader properties.
    427 // The 'announce' property determines if screenreaders should announce
    428 // progress for this operation.
    429 // The 'announceDelay' property is how many milliseconds must pass before
    430 // AJAX progress is announced by a screen reader. This prevents announcing
    431 // operations that are completed quickly enough that an announcement is
    432 // not necessary or useful.
    433 // The 'announceIntervalTime' property is how many milliseconds must
    434 // pass before the operation is re-announced. This provides a way to
    435 // distinguish an operation in progress vs an operation that did not\
    436 // complete.
    437 // The 'announceMessage' property is what is used if no 'message'
    438 // property is present.
    439 if (isset($settings['progress'])) {
  • 919 919 typeof this[progressIndicatorMethod] === 'function'
    920 920 ) {
    921 921 this[progressIndicatorMethod].call(this);
    922
    923 // To avoid very fast AJAX operations from being announced, wait for the
    924 // duration of the announceDelay property (1 second by default) before
    925 // announcing progress to screenreaders.
    926 const delay = this.progress.announceDelay || 1000;
    927 setTimeout(() => {
    928 // Note that the disabling of $(this.element) is a pre-existing
    929 // implementation used to prevent interaction while the request is in
    930 // progress. It is being leveraged here as a way to confirm the AJAX
    931 // operation completed as nothing else is available in scope to do so.
    932 const shouldAnnounce = this.progress.hasOwnProperty('announce')
    Please register or sign in to reply
    Loading