UNPKG

@wordpress/a11y

Version:
23 lines (22 loc) 736 B
// packages/a11y/src/script/add-intro-text.ts import { __ } from "@wordpress/i18n"; function addIntroText() { const introText = document.createElement("p"); introText.id = "a11y-speak-intro-text"; introText.className = "a11y-speak-intro-text"; introText.textContent = __("Notifications"); introText.setAttribute( "style", "position:absolute;margin:-1px;padding:0;height:1px;width:1px;overflow:hidden;clip-path:inset(50%);border:0;word-wrap:normal !important;word-break:normal !important;" ); introText.setAttribute("hidden", ""); const { body } = document; if (body) { body.appendChild(introText); } return introText; } export { addIntroText as default }; //# sourceMappingURL=add-intro-text.mjs.map