PageSourceSearch

https://www.maetoday.org/modules/custom/nea_suite/modules/nea_ims_…ms_ajax_form_accessibility_helper.js?tltw7u

js maetoday.org collected 2026-09-26 13:37:09 UTC 969 bytes, 31 lines download raw bytes

1(function (Drupal) {
2  'use strict';
3
4  /**
5   * Sets the aria-busy attribute on the submitted form to 'true'. The attribute
6   * is set to 'false' by each form's submit handler once processing is complete
7   * (must be done manually on each form listed below).
8   *
9   * See Drupal.Ajax.prototype.beforeSubmit in docroot/core/misc/ajax.es6.js.
10   */
11
12  // Save anything that might've already been there.
13  const originalImplementation = Drupal.Ajax.prototype.beforeSubmit;
14
15  Drupal.Ajax.prototype.beforeSubmit = function (formValues, element, options) {
16    const formId = element[0]?.getAttribute('id')
17    const imsLoginForms = [
18      'user-login-form',
19      'user-register-form',
20    ]
21
22    if (imsLoginForms.includes(formId)) {
23      const form = document.querySelector(`#${formId}`)
24      form.setAttribute('aria-busy', true)
25    }
26
27    // Call the existing implementation.
28    originalImplementation.call(this, formValues, element, options)
29  };
30
31})(Drupal);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.