wp/wp-includes/js/dist/a11y.js
changeset 21 48c4eec2b7e6
parent 19 3d72ae0968f4
child 22 8c2e4d02f4ef
--- a/wp/wp-includes/js/dist/a11y.js	Thu Sep 29 08:06:27 2022 +0200
+++ b/wp/wp-includes/js/dist/a11y.js	Fri Sep 05 18:40:08 2025 +0200
@@ -1,48 +1,48 @@
-/******/ (function() { // webpackBootstrap
+/******/ (() => { // webpackBootstrap
 /******/ 	"use strict";
 /******/ 	// The require scope
 /******/ 	var __webpack_require__ = {};
 /******/ 	
 /************************************************************************/
 /******/ 	/* webpack/runtime/compat get default export */
-/******/ 	!function() {
+/******/ 	(() => {
 /******/ 		// getDefaultExport function for compatibility with non-harmony modules
-/******/ 		__webpack_require__.n = function(module) {
+/******/ 		__webpack_require__.n = (module) => {
 /******/ 			var getter = module && module.__esModule ?
-/******/ 				function() { return module['default']; } :
-/******/ 				function() { return module; };
+/******/ 				() => (module['default']) :
+/******/ 				() => (module);
 /******/ 			__webpack_require__.d(getter, { a: getter });
 /******/ 			return getter;
 /******/ 		};
-/******/ 	}();
+/******/ 	})();
 /******/ 	
 /******/ 	/* webpack/runtime/define property getters */
-/******/ 	!function() {
+/******/ 	(() => {
 /******/ 		// define getter functions for harmony exports
-/******/ 		__webpack_require__.d = function(exports, definition) {
+/******/ 		__webpack_require__.d = (exports, definition) => {
 /******/ 			for(var key in definition) {
 /******/ 				if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
 /******/ 					Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
 /******/ 				}
 /******/ 			}
 /******/ 		};
-/******/ 	}();
+/******/ 	})();
 /******/ 	
 /******/ 	/* webpack/runtime/hasOwnProperty shorthand */
-/******/ 	!function() {
-/******/ 		__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
-/******/ 	}();
+/******/ 	(() => {
+/******/ 		__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
+/******/ 	})();
 /******/ 	
 /******/ 	/* webpack/runtime/make namespace object */
-/******/ 	!function() {
+/******/ 	(() => {
 /******/ 		// define __esModule on exports
-/******/ 		__webpack_require__.r = function(exports) {
+/******/ 		__webpack_require__.r = (exports) => {
 /******/ 			if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
 /******/ 				Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
 /******/ 			}
 /******/ 			Object.defineProperty(exports, '__esModule', { value: true });
 /******/ 		};
-/******/ 	}();
+/******/ 	})();
 /******/ 	
 /************************************************************************/
 var __webpack_exports__ = {};
@@ -51,20 +51,21 @@
 
 // EXPORTS
 __webpack_require__.d(__webpack_exports__, {
-  "setup": function() { return /* binding */ setup; },
-  "speak": function() { return /* binding */ speak; }
+  setup: () => (/* binding */ setup),
+  speak: () => (/* binding */ speak)
 });
 
 ;// CONCATENATED MODULE: external ["wp","domReady"]
-var external_wp_domReady_namespaceObject = window["wp"]["domReady"];
+const external_wp_domReady_namespaceObject = window["wp"]["domReady"];
 var external_wp_domReady_default = /*#__PURE__*/__webpack_require__.n(external_wp_domReady_namespaceObject);
 ;// CONCATENATED MODULE: external ["wp","i18n"]
-var external_wp_i18n_namespaceObject = window["wp"]["i18n"];
+const external_wp_i18n_namespaceObject = window["wp"]["i18n"];
 ;// CONCATENATED MODULE: ./node_modules/@wordpress/a11y/build-module/add-intro-text.js
 /**
  * WordPress dependencies
  */
 
+
 /**
  * Build the explanatory text to be placed before the aria live regions.
  *
@@ -73,7 +74,6 @@
  *
  * @return {HTMLParagraphElement} The explanatory text HTML element.
  */
-
 function addIntroText() {
   const introText = document.createElement('p');
   introText.id = 'a11y-speak-intro-text';
@@ -84,11 +84,9 @@
   const {
     body
   } = document;
-
   if (body) {
     body.appendChild(introText);
   }
-
   return introText;
 }
 
@@ -100,8 +98,7 @@
  *
  * @return {HTMLDivElement} The ARIA live region HTML element.
  */
-function addContainer() {
-  let ariaLive = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'polite';
+function addContainer(ariaLive = 'polite') {
   const container = document.createElement('div');
   container.id = `a11y-speak-${ariaLive}`;
   container.className = 'a11y-speak-region';
@@ -112,11 +109,9 @@
   const {
     body
   } = document;
-
   if (body) {
     body.appendChild(container);
   }
-
   return container;
 }
 
@@ -127,12 +122,11 @@
 function clear() {
   const regions = document.getElementsByClassName('a11y-speak-region');
   const introText = document.getElementById('a11y-speak-intro-text');
-
   for (let i = 0; i < regions.length; i++) {
     regions[i].textContent = '';
-  } // Make sure the explanatory text is hidden from assistive technologies.
+  }
 
-
+  // Make sure the explanatory text is hidden from assistive technologies.
   if (introText) {
     introText.setAttribute('hidden', 'hidden');
   }
@@ -140,6 +134,7 @@
 
 ;// CONCATENATED MODULE: ./node_modules/@wordpress/a11y/build-module/filter-message.js
 let previousMessage = '';
+
 /**
  * Filter the message to be announced to the screenreader.
  *
@@ -147,7 +142,6 @@
  *
  * @return {string} The filtered message.
  */
-
 function filterMessage(message) {
   /*
    * Strip HTML tags (if any) from the message string. Ideally, messages should
@@ -157,15 +151,14 @@
    * spaces natively.
    */
   message = message.replace(/<[^<>]+>/g, ' ');
+
   /*
    * Safari + VoiceOver don't announce repeated, identical strings. We use
    * a `no-break space` to force them to think identical strings are different.
    */
-
   if (previousMessage === message) {
     message += '\u00A0';
   }
-
   previousMessage = message;
   return message;
 }
@@ -175,6 +168,7 @@
  * WordPress dependencies
  */
 
+
 /**
  * Internal dependencies
  */
@@ -186,29 +180,26 @@
 /**
  * Create the live regions.
  */
-
 function setup() {
   const introText = document.getElementById('a11y-speak-intro-text');
   const containerAssertive = document.getElementById('a11y-speak-assertive');
   const containerPolite = document.getElementById('a11y-speak-polite');
-
   if (introText === null) {
     addIntroText();
   }
-
   if (containerAssertive === null) {
     addContainer('assertive');
   }
-
   if (containerPolite === null) {
     addContainer('polite');
   }
 }
+
 /**
  * Run setup on domReady.
  */
+external_wp_domReady_default()(setup);
 
-external_wp_domReady_default()(setup);
 /**
  * Allows you to easily announce dynamic interface updates to screen readers using ARIA live regions.
  * This module is inspired by the `speak` function in `wp-a11y.js`.
@@ -227,7 +218,6 @@
  * speak( 'The message you want to send to the ARIA live region', 'assertive' );
  * ```
  */
-
 function speak(message, ariaLive) {
   /*
    * Clear previous messages to allow repeated strings being read out and hide
@@ -238,18 +228,16 @@
   const introText = document.getElementById('a11y-speak-intro-text');
   const containerAssertive = document.getElementById('a11y-speak-assertive');
   const containerPolite = document.getElementById('a11y-speak-polite');
-
   if (containerAssertive && ariaLive === 'assertive') {
     containerAssertive.textContent = message;
   } else if (containerPolite) {
     containerPolite.textContent = message;
   }
+
   /*
    * Make the explanatory text available to assistive technologies by removing
    * the 'hidden' HTML attribute.
    */
-
-
   if (introText) {
     introText.removeAttribute('hidden');
   }