Skip to content
Snippets Groups Projects

Convey AJAX progress messages to assistive technology. - #2973140

5 unresolved threads

Closes #2973140

Merge request reports

Members who can merge are allowed to add commits.
Code Quality is loading
Test summary results are being parsed
Ready to merge by members who can write to the target branch.
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')
  • jeremyvii added 1 commit

    added 1 commit

    • 484f9916 - Remove "screenreaders" from dictionary

    Compare with previous version

  • jeremyvii added 1 commit

    added 1 commit

    • adcf4e22 - Create kernel tests for announce settings

    Compare with previous version

  • jeremyvii added 1 commit

    added 1 commit

    • 71be8b43 - Add return type to test function

    Compare with previous version

  • jeremyvii added 1 commit

    added 1 commit

    • 1315cb7c - Add JavaScript tests for progress announcement

    Compare with previous version

  • jeremyvii added 540 commits

    added 540 commits

    • 1315cb7c...73613e52 - 532 commits from branch project:11.x
    • 062de715 - Convey AJAX progress messages to assistive technology. - #2973140
    • 298aefb0 - Removed console.
    • 256ca6eb - Removed Big pipe regression test change
    • 210cfad0 - Added `screenreaders` to dictionary
    • ca2e3c6e - Remove "screenreaders" from dictionary
    • 277ee3bb - Create kernel tests for announce settings
    • ee0e887e - Add return type to test function
    • 6656c3bc - Add JavaScript tests for progress announcement

    Compare with previous version

  • jeremyvii added 1 commit

    added 1 commit

    • 91367f9e - Fix namespace typo in AjaxProgressAnnounceTest

    Compare with previous version

  • jeremyvii added 24 commits

    added 24 commits

    • 91367f9e...a0a7640c - 15 commits from branch project:11.x
    • 77539efd - Convey AJAX progress messages to assistive technology. - #2973140
    • cec6047d - Removed console.
    • f8255ec6 - Removed Big pipe regression test change
    • b6918ec8 - Added `screenreaders` to dictionary
    • 57c9a1c6 - Remove "screenreaders" from dictionary
    • 5939b40e - Create kernel tests for announce settings
    • 7564da0f - Add return type to test function
    • 11b47a53 - Add JavaScript tests for progress announcement
    • c38dcfcb - Fix namespace typo in AjaxProgressAnnounceTest

    Compare with previous version

  • 35 35 '#markup' => '<p>' . $this->t("Ajax Form contents description.") . '</p>',
    36 36 ];
    37 37
    38 $form['select'] = [
    39 '#type' => 'select',
    40 '#title' => 'AJAX Select field',
    41 '#options' => [
    • This may have broken a test. The Actual value in the failure message looks like these new #options values.

          Dialog (Drupal\FunctionalJavascriptTests\Ajax\Dialog)
           ✘ Dialog
      
             ├ Failed asserting that two strings are equal.
             ┊ ---·Expected
             ┊ +++·Actual
             ┊ @@ @@
             ┊ -'Do·it'
             ┊ +'\n
             ┊ +············One\n
             ┊ +················Two\n
             ┊ +······'
      
             │ /builds/issue/drupal-2973140/core/tests/Drupal/FunctionalJavascriptTests/Ajax/DialogTest.php:192
      
    • Please register or sign in to reply
  • Please register or sign in to reply
    Loading