diff -r 48c4eec2b7e6 -r 8c2e4d02f4ef wp/wp-includes/js/dist/a11y.js --- a/wp/wp-includes/js/dist/a11y.js Fri Sep 05 18:40:08 2025 +0200 +++ b/wp/wp-includes/js/dist/a11y.js Fri Sep 05 18:52:52 2025 +0200 @@ -52,15 +52,40 @@ // EXPORTS __webpack_require__.d(__webpack_exports__, { setup: () => (/* binding */ setup), - speak: () => (/* binding */ speak) + speak: () => (/* reexport */ speak) }); -;// CONCATENATED MODULE: external ["wp","domReady"] +;// external ["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"] +;// ./node_modules/@wordpress/a11y/build-module/script/add-container.js +/** + * Build the live regions markup. + * + * @param {string} [ariaLive] Value for the 'aria-live' attribute; default: 'polite'. + * + * @return {HTMLDivElement} The ARIA live region HTML element. + */ +function addContainer(ariaLive = 'polite') { + const container = document.createElement('div'); + container.id = `a11y-speak-${ariaLive}`; + container.className = 'a11y-speak-region'; + container.setAttribute('style', 'position: absolute;' + 'margin: -1px;' + 'padding: 0;' + 'height: 1px;' + 'width: 1px;' + 'overflow: hidden;' + 'clip: rect(1px, 1px, 1px, 1px);' + '-webkit-clip-path: inset(50%);' + 'clip-path: inset(50%);' + 'border: 0;' + 'word-wrap: normal !important;'); + container.setAttribute('aria-live', ariaLive); + container.setAttribute('aria-relevant', 'additions text'); + container.setAttribute('aria-atomic', 'true'); + const { + body + } = document; + if (body) { + body.appendChild(container); + } + return container; +} + +;// external ["wp","i18n"] const external_wp_i18n_namespaceObject = window["wp"]["i18n"]; -;// CONCATENATED MODULE: ./node_modules/@wordpress/a11y/build-module/add-intro-text.js +;// ./node_modules/@wordpress/a11y/build-module/script/add-intro-text.js /** * WordPress dependencies */ @@ -90,32 +115,7 @@ return introText; } -;// CONCATENATED MODULE: ./node_modules/@wordpress/a11y/build-module/add-container.js -/** - * Build the live regions markup. - * - * @param {string} [ariaLive] Value for the 'aria-live' attribute; default: 'polite'. - * - * @return {HTMLDivElement} The ARIA live region HTML element. - */ -function addContainer(ariaLive = 'polite') { - const container = document.createElement('div'); - container.id = `a11y-speak-${ariaLive}`; - container.className = 'a11y-speak-region'; - container.setAttribute('style', 'position: absolute;' + 'margin: -1px;' + 'padding: 0;' + 'height: 1px;' + 'width: 1px;' + 'overflow: hidden;' + 'clip: rect(1px, 1px, 1px, 1px);' + '-webkit-clip-path: inset(50%);' + 'clip-path: inset(50%);' + 'border: 0;' + 'word-wrap: normal !important;'); - container.setAttribute('aria-live', ariaLive); - container.setAttribute('aria-relevant', 'additions text'); - container.setAttribute('aria-atomic', 'true'); - const { - body - } = document; - if (body) { - body.appendChild(container); - } - return container; -} - -;// CONCATENATED MODULE: ./node_modules/@wordpress/a11y/build-module/clear.js +;// ./node_modules/@wordpress/a11y/build-module/shared/clear.js /** * Clears the a11y-speak-region elements and hides the explanatory text. */ @@ -132,7 +132,7 @@ } } -;// CONCATENATED MODULE: ./node_modules/@wordpress/a11y/build-module/filter-message.js +;// ./node_modules/@wordpress/a11y/build-module/shared/filter-message.js let previousMessage = ''; /** @@ -163,49 +163,19 @@ return message; } -;// CONCATENATED MODULE: ./node_modules/@wordpress/a11y/build-module/index.js -/** - * WordPress dependencies - */ - - +;// ./node_modules/@wordpress/a11y/build-module/shared/index.js /** * Internal dependencies */ - - -/** - * 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); - /** * 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`. * - * @param {string} message The message to be announced by assistive technologies. - * @param {string} [ariaLive] The politeness level for aria-live; default: 'polite'. + * @param {string} message The message to be announced by assistive technologies. + * @param {'polite'|'assertive'} [ariaLive] The politeness level for aria-live; default: 'polite'. * * @example * ```js @@ -243,6 +213,42 @@ } } +;// ./node_modules/@wordpress/a11y/build-module/index.js +/** + * WordPress dependencies + */ + + +/** + * Internal dependencies + */ + + + + +/** + * 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); + (window.wp = window.wp || {}).a11y = __webpack_exports__; /******/ })() ; \ No newline at end of file