UNPKG

@wordpress/a11y

Version:
8 lines (7 loc) 1.37 kB
{ "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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAqB;AACrB,2BAAyB;AACzB,4BAAyB;AAEzB,oBAAsB;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,8BAAAA,SAAa;AAAA,EACd;AAEA,MAAK,uBAAuB,MAAO;AAClC,6BAAAC,SAAc,WAAY;AAAA,EAC3B;AAEA,MAAK,oBAAoB,MAAO;AAC/B,6BAAAA,SAAc,QAAS;AAAA,EACxB;AACD;AAAA,IAKA,iBAAAC,SAAU,KAAM;", "names": ["addIntroText", "addContainer", "domReady"] }