Gestionnaire de fichiers - Editer - /home/wwgoat/public_html/blog/a11y.tar
Arrière
index.js 0000644 00000011436 14720715016 0006221 0 ustar 00 /******/ // The require scope /******/ var __webpack_require__ = {}; /******/ /************************************************************************/ /******/ /* webpack/runtime/define property getters */ /******/ (() => { /******/ // define getter functions for harmony exports /******/ __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 */ /******/ (() => { /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) /******/ })(); /******/ /************************************************************************/ var __webpack_exports__ = {}; // EXPORTS __webpack_require__.d(__webpack_exports__, { m: () => (/* binding */ setup), L: () => (/* reexport */ speak) }); ;// CONCATENATED MODULE: ./node_modules/@wordpress/a11y/build-module/shared/clear.js /** * Clears the a11y-speak-region elements and hides the explanatory text. */ 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. if (introText) { introText.setAttribute('hidden', 'hidden'); } } ;// CONCATENATED MODULE: ./node_modules/@wordpress/a11y/build-module/shared/filter-message.js let previousMessage = ''; /** * Filter the message to be announced to the screenreader. * * @param {string} message The message to be announced. * * @return {string} The filtered message. */ function filterMessage(message) { /* * Strip HTML tags (if any) from the message string. Ideally, messages should * be simple strings, carefully crafted for specific use with A11ySpeak. * When re-using already existing strings this will ensure simple HTML to be * stripped out and replaced with a space. Browsers will collapse multiple * 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; } ;// CONCATENATED MODULE: ./node_modules/@wordpress/a11y/build-module/shared/index.js /** * Internal dependencies */ /** * 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 {'polite'|'assertive'} [ariaLive] The politeness level for aria-live; default: 'polite'. * * @example * ```js * import { speak } from '@wordpress/a11y'; * * // For polite messages that shouldn't interrupt what screen readers are currently announcing. * speak( 'The message you want to send to the ARIA live region' ); * * // For assertive messages that should interrupt what screen readers are currently announcing. * 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 * the explanatory text from assistive technologies. */ clear(); message = filterMessage(message); 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'); } } ;// CONCATENATED MODULE: ./node_modules/@wordpress/a11y/build-module/module/index.js /** * Internal dependencies */ /** * This no-op function is exported to provide compatibility with the `wp-a11y` Script. * * Filters should inject the relevant HTML on page load instead of requiring setup. */ const setup = () => {}; var __webpack_exports__setup = __webpack_exports__.m; var __webpack_exports__speak = __webpack_exports__.L; export { __webpack_exports__setup as setup, __webpack_exports__speak as speak }; index.min.js 0000644 00000001443 14720715016 0007000 0 ustar 00 var e={d:(t,n)=>{for(var o in n)e.o(n,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:n[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},t={};e.d(t,{m:()=>a,L:()=>o});let n="";function o(e,t){!function(){const e=document.getElementsByClassName("a11y-speak-region"),t=document.getElementById("a11y-speak-intro-text");for(let t=0;t<e.length;t++)e[t].textContent="";t&&t.setAttribute("hidden","hidden")}(),e=function(e){return e=e.replace(/<[^<>]+>/g," "),n===e&&(e+=" "),n=e,e}(e);const o=document.getElementById("a11y-speak-intro-text"),a=document.getElementById("a11y-speak-assertive"),r=document.getElementById("a11y-speak-polite");a&&"assertive"===t?a.textContent=e:r&&(r.textContent=e),o&&o.removeAttribute("hidden")}const a=()=>{};var r=t.m,s=t.L;export{r as setup,s as speak};
| ver. 1.4 |
Github
|
.
| PHP 8.0.30 | Génération de la page: 0 |
proxy
|
phpinfo
|
Réglages