diff -r 34716fd837a4 -r be944660c56a wp/wp-includes/js/dist/a11y.js --- a/wp/wp-includes/js/dist/a11y.js Tue Dec 15 15:52:01 2020 +0100 +++ b/wp/wp-includes/js/dist/a11y.js Wed Sep 21 18:19:35 2022 +0200 @@ -82,26 +82,19 @@ /******/ /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 459); +/******/ return __webpack_require__(__webpack_require__.s = "jncB"); /******/ }) /************************************************************************/ /******/ ({ -/***/ 1: +/***/ "Y8OO": /***/ (function(module, exports) { -(function() { module.exports = this["wp"]["i18n"]; }()); +(function() { module.exports = window["wp"]["domReady"]; }()); /***/ }), -/***/ 261: -/***/ (function(module, exports) { - -(function() { module.exports = this["wp"]["domReady"]; }()); - -/***/ }), - -/***/ 459: +/***/ "jncB": /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; @@ -112,12 +105,12 @@ __webpack_require__.d(__webpack_exports__, "setup", function() { return /* binding */ setup; }); __webpack_require__.d(__webpack_exports__, "speak", function() { return /* binding */ speak; }); -// EXTERNAL MODULE: external {"this":["wp","domReady"]} -var external_this_wp_domReady_ = __webpack_require__(261); -var external_this_wp_domReady_default = /*#__PURE__*/__webpack_require__.n(external_this_wp_domReady_); +// EXTERNAL MODULE: external ["wp","domReady"] +var external_wp_domReady_ = __webpack_require__("Y8OO"); +var external_wp_domReady_default = /*#__PURE__*/__webpack_require__.n(external_wp_domReady_); -// EXTERNAL MODULE: external {"this":["wp","i18n"]} -var external_this_wp_i18n_ = __webpack_require__(1); +// EXTERNAL MODULE: external ["wp","i18n"] +var external_wp_i18n_ = __webpack_require__("l3Sj"); // CONCATENATED MODULE: ./node_modules/@wordpress/a11y/build-module/add-intro-text.js /** @@ -134,14 +127,15 @@ */ function addIntroText() { - var introText = document.createElement('p'); + const introText = document.createElement('p'); introText.id = 'a11y-speak-intro-text'; introText.className = 'a11y-speak-intro-text'; - introText.textContent = Object(external_this_wp_i18n_["__"])('Notifications'); + introText.textContent = Object(external_wp_i18n_["__"])('Notifications'); introText.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;'); introText.setAttribute('hidden', 'hidden'); - var _document = document, - body = _document.body; + const { + body + } = document; if (body) { body.appendChild(introText); @@ -158,17 +152,17 @@ * * @return {HTMLDivElement} The ARIA live region HTML element. */ -function addContainer() { - var ariaLive = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'polite'; - var container = document.createElement('div'); - container.id = "a11y-speak-".concat(ariaLive); +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'); - var _document = document, - body = _document.body; + const { + body + } = document; if (body) { body.appendChild(container); @@ -182,10 +176,10 @@ * Clears the a11y-speak-region elements and hides the explanatory text. */ function clear() { - var regions = document.getElementsByClassName('a11y-speak-region'); - var introText = document.getElementById('a11y-speak-intro-text'); + const regions = document.getElementsByClassName('a11y-speak-region'); + const introText = document.getElementById('a11y-speak-intro-text'); - for (var i = 0; i < regions.length; i++) { + for (let i = 0; i < regions.length; i++) { regions[i].textContent = ''; } // Make sure the explanatory text is hidden from assistive technologies. @@ -196,7 +190,7 @@ } // CONCATENATED MODULE: ./node_modules/@wordpress/a11y/build-module/filter-message.js -var previousMessage = ''; +let previousMessage = ''; /** * Filter the message to be announced to the screenreader. * @@ -220,7 +214,7 @@ */ if (previousMessage === message) { - message += "\xA0"; + message += '\u00A0'; } previousMessage = message; @@ -245,9 +239,9 @@ */ function setup() { - var introText = document.getElementById('a11y-speak-intro-text'); - var containerAssertive = document.getElementById('a11y-speak-assertive'); - var containerPolite = document.getElementById('a11y-speak-polite'); + 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(); @@ -265,7 +259,7 @@ * Run setup on domReady. */ -external_this_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`. @@ -292,9 +286,9 @@ */ clear(); message = filterMessage(message); - var introText = document.getElementById('a11y-speak-intro-text'); - var containerAssertive = document.getElementById('a11y-speak-assertive'); - var containerPolite = document.getElementById('a11y-speak-polite'); + 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; @@ -313,6 +307,13 @@ } +/***/ }), + +/***/ "l3Sj": +/***/ (function(module, exports) { + +(function() { module.exports = window["wp"]["i18n"]; }()); + /***/ }) /******/ }); \ No newline at end of file