plugin updates
This commit is contained in:
130
wp/wp-includes/js/dist/a11y.js
vendored
130
wp/wp-includes/js/dist/a11y.js
vendored
@@ -52,15 +52,40 @@ __webpack_require__.r(__webpack_exports__);
|
||||
// EXPORTS
|
||||
__webpack_require__.d(__webpack_exports__, {
|
||||
setup: () => (/* binding */ setup),
|
||||
speak: () => (/* binding */ speak)
|
||||
speak: () => (/* reexport */ speak)
|
||||
});
|
||||
|
||||
;// CONCATENATED MODULE: 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: ./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;
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: external ["wp","i18n"]
|
||||
const external_wp_i18n_namespaceObject = window["wp"]["i18n"];
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/a11y/build-module/add-intro-text.js
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/a11y/build-module/script/add-intro-text.js
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
@@ -90,32 +115,7 @@ function addIntroText() {
|
||||
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
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/a11y/build-module/shared/clear.js
|
||||
/**
|
||||
* Clears the a11y-speak-region elements and hides the explanatory text.
|
||||
*/
|
||||
@@ -132,7 +132,7 @@ function clear() {
|
||||
}
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/a11y/build-module/filter-message.js
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/a11y/build-module/shared/filter-message.js
|
||||
let previousMessage = '';
|
||||
|
||||
/**
|
||||
@@ -163,49 +163,19 @@ function filterMessage(message) {
|
||||
return message;
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: ./node_modules/@wordpress/a11y/build-module/index.js
|
||||
/**
|
||||
* WordPress dependencies
|
||||
*/
|
||||
|
||||
|
||||
;// CONCATENATED MODULE: ./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 @@ function speak(message, ariaLive) {
|
||||
}
|
||||
}
|
||||
|
||||
;// CONCATENATED MODULE: ./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__;
|
||||
/******/ })()
|
||||
;
|
||||
Reference in New Issue
Block a user