Server IP : 85.214.239.14 / Your IP : 18.117.156.84 Web Server : Apache/2.4.62 (Debian) System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.18 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /var/www/wordpress/wp-includes/js/dist/script-modules/a11y/ |
Upload File : |
/******/ // 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 };