@wordpress/a11y
Version:
Accessibility (a11y) utilities for WordPress.
8 lines (7 loc) • 1.25 kB
Source Map (JSON)
{
"version": 3,
"sources": ["../src/index.ts"],
"sourcesContent": ["import domReady from '@wordpress/dom-ready';\nimport addContainer from './script/add-container';\nimport addIntroText from './script/add-intro-text';\n\nexport { speak } from './shared/index';\n\n/**\n * Create the live regions.\n */\nexport function setup(): void {\n\tconst introText = document.getElementById( 'a11y-speak-intro-text' );\n\tconst containerAssertive = document.getElementById(\n\t\t'a11y-speak-assertive'\n\t);\n\tconst containerPolite = document.getElementById( 'a11y-speak-polite' );\n\n\tif ( introText === null ) {\n\t\taddIntroText();\n\t}\n\n\tif ( containerAssertive === null ) {\n\t\taddContainer( 'assertive' );\n\t}\n\n\tif ( containerPolite === null ) {\n\t\taddContainer( 'polite' );\n\t}\n}\n\n/**\n * Run setup on domReady.\n */\ndomReady( setup );\n"],
"mappings": ";AAAA,OAAO,cAAc;AACrB,OAAO,kBAAkB;AACzB,OAAO,kBAAkB;AAEzB,SAAS,aAAa;AAKf,SAAS,QAAc;AAC7B,QAAM,YAAY,SAAS,eAAgB,uBAAwB;AACnE,QAAM,qBAAqB,SAAS;AAAA,IACnC;AAAA,EACD;AACA,QAAM,kBAAkB,SAAS,eAAgB,mBAAoB;AAErE,MAAK,cAAc,MAAO;AACzB,iBAAa;AAAA,EACd;AAEA,MAAK,uBAAuB,MAAO;AAClC,iBAAc,WAAY;AAAA,EAC3B;AAEA,MAAK,oBAAoB,MAAO;AAC/B,iBAAc,QAAS;AAAA,EACxB;AACD;AAKA,SAAU,KAAM;",
"names": []
}