UNPKG

@wordpress/a11y

Version:
28 lines (27 loc) 750 B
// packages/a11y/src/index.ts import domReady from "@wordpress/dom-ready"; import addContainer from "./script/add-container.mjs"; import addIntroText from "./script/add-intro-text.mjs"; import { speak } from "./shared/index.mjs"; 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"); } } domReady(setup); export { setup, speak }; //# sourceMappingURL=index.mjs.map