@wordpress/a11y 4.7.0 → 4.7.1-next.1f6eadc42.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/build/index.js +10 -63
- package/build/index.js.map +1 -1
- package/build/index.native.js +1 -1
- package/build/index.native.js.map +1 -1
- package/build/module/index.js +35 -0
- package/build/module/index.js.map +1 -0
- package/build/shared/add-container.js.map +1 -0
- package/build/{add-intro-text.js → shared/add-intro-text.js} +3 -7
- package/build/shared/add-intro-text.js.map +1 -0
- package/build/shared/clear.js.map +1 -0
- package/build/shared/filter-message.js.map +1 -0
- package/build/shared/index.js +80 -0
- package/build/shared/index.js.map +1 -0
- package/build-module/index.js +4 -61
- package/build-module/index.js.map +1 -1
- package/build-module/index.native.js +1 -1
- package/build-module/index.native.js.map +1 -1
- package/build-module/module/index.js +24 -0
- package/build-module/module/index.js.map +1 -0
- package/build-module/shared/add-container.js.map +1 -0
- package/build-module/{add-intro-text.js → shared/add-intro-text.js} +3 -7
- package/build-module/shared/add-intro-text.js.map +1 -0
- package/build-module/shared/clear.js.map +1 -0
- package/build-module/shared/filter-message.js.map +1 -0
- package/build-module/shared/index.js +72 -0
- package/build-module/shared/index.js.map +1 -0
- package/build-types/index.d.ts +2 -20
- package/build-types/index.d.ts.map +1 -1
- package/build-types/module/index.d.ts +6 -0
- package/build-types/module/index.d.ts.map +1 -0
- package/build-types/shared/add-container.d.ts.map +1 -0
- package/build-types/{add-intro-text.d.ts → shared/add-intro-text.d.ts} +2 -1
- package/build-types/shared/add-intro-text.d.ts.map +1 -0
- package/build-types/shared/clear.d.ts.map +1 -0
- package/build-types/shared/filter-message.d.ts.map +1 -0
- package/build-types/shared/index.d.ts +25 -0
- package/build-types/shared/index.d.ts.map +1 -0
- package/package.json +5 -4
- package/src/index.js +4 -71
- package/src/index.native.js +1 -1
- package/src/module/index.ts +25 -0
- package/src/{add-intro-text.js → shared/add-intro-text.ts} +3 -7
- package/src/shared/index.js +81 -0
- package/src/test/index.test.js +4 -4
- package/tsconfig.tsbuildinfo +1 -1
- package/build/add-container.js.map +0 -1
- package/build/add-intro-text.js.map +0 -1
- package/build/clear.js.map +0 -1
- package/build/filter-message.js.map +0 -1
- package/build-module/add-container.js.map +0 -1
- package/build-module/add-intro-text.js.map +0 -1
- package/build-module/clear.js.map +0 -1
- package/build-module/filter-message.js.map +0 -1
- package/build-types/add-container.d.ts.map +0 -1
- package/build-types/add-intro-text.d.ts.map +0 -1
- package/build-types/clear.d.ts.map +0 -1
- package/build-types/filter-message.d.ts.map +0 -1
- /package/build/{add-container.js → shared/add-container.js} +0 -0
- /package/build/{clear.js → shared/clear.js} +0 -0
- /package/build/{filter-message.js → shared/filter-message.js} +0 -0
- /package/build-module/{add-container.js → shared/add-container.js} +0 -0
- /package/build-module/{clear.js → shared/clear.js} +0 -0
- /package/build-module/{filter-message.js → shared/filter-message.js} +0 -0
- /package/build-types/{add-container.d.ts → shared/add-container.d.ts} +0 -0
- /package/build-types/{clear.d.ts → shared/clear.d.ts} +0 -0
- /package/build-types/{filter-message.d.ts → shared/filter-message.d.ts} +0 -0
- /package/src/{add-container.js → shared/add-container.js} +0 -0
- /package/src/{clear.js → shared/clear.js} +0 -0
- /package/src/{filter-message.js → shared/filter-message.js} +0 -0
- /package/src/{test → shared/test}/add-container.test.js +0 -0
- /package/src/{test → shared/test}/clear.test.js +0 -0
- /package/src/{test → shared/test}/filter-message.test.js +0 -0
package/README.md
CHANGED
|
@@ -39,7 +39,7 @@ speak( 'The message you want to send to the ARIA live region', 'assertive' );
|
|
|
39
39
|
_Parameters_
|
|
40
40
|
|
|
41
41
|
- _message_ `string`: The message to be announced by assistive technologies.
|
|
42
|
-
- _ariaLive_ `[
|
|
42
|
+
- _ariaLive_ `['polite'|'assertive']`: The politeness level for aria-live; default: 'polite'.
|
|
43
43
|
|
|
44
44
|
<!-- END TOKEN(Autogenerated API docs) -->
|
|
45
45
|
|
package/build/index.js
CHANGED
|
@@ -4,13 +4,16 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports.setup =
|
|
8
|
-
exports
|
|
7
|
+
exports.setup = void 0;
|
|
8
|
+
Object.defineProperty(exports, "speak", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () {
|
|
11
|
+
return _index.speak;
|
|
12
|
+
}
|
|
13
|
+
});
|
|
9
14
|
var _domReady = _interopRequireDefault(require("@wordpress/dom-ready"));
|
|
10
|
-
var
|
|
11
|
-
var
|
|
12
|
-
var _clear = _interopRequireDefault(require("./clear"));
|
|
13
|
-
var _filterMessage = _interopRequireDefault(require("./filter-message"));
|
|
15
|
+
var _i18n = require("@wordpress/i18n");
|
|
16
|
+
var _index = require("./shared/index");
|
|
14
17
|
/**
|
|
15
18
|
* WordPress dependencies
|
|
16
19
|
*/
|
|
@@ -22,66 +25,10 @@ var _filterMessage = _interopRequireDefault(require("./filter-message"));
|
|
|
22
25
|
/**
|
|
23
26
|
* Create the live regions.
|
|
24
27
|
*/
|
|
25
|
-
|
|
26
|
-
const introText = document.getElementById('a11y-speak-intro-text');
|
|
27
|
-
const containerAssertive = document.getElementById('a11y-speak-assertive');
|
|
28
|
-
const containerPolite = document.getElementById('a11y-speak-polite');
|
|
29
|
-
if (introText === null) {
|
|
30
|
-
(0, _addIntroText.default)();
|
|
31
|
-
}
|
|
32
|
-
if (containerAssertive === null) {
|
|
33
|
-
(0, _addContainer.default)('assertive');
|
|
34
|
-
}
|
|
35
|
-
if (containerPolite === null) {
|
|
36
|
-
(0, _addContainer.default)('polite');
|
|
37
|
-
}
|
|
38
|
-
}
|
|
28
|
+
const setup = exports.setup = (0, _index.makeSetupFunction)((0, _i18n.__)('Notifications'));
|
|
39
29
|
|
|
40
30
|
/**
|
|
41
31
|
* Run setup on domReady.
|
|
42
32
|
*/
|
|
43
33
|
(0, _domReady.default)(setup);
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* Allows you to easily announce dynamic interface updates to screen readers using ARIA live regions.
|
|
47
|
-
* This module is inspired by the `speak` function in `wp-a11y.js`.
|
|
48
|
-
*
|
|
49
|
-
* @param {string} message The message to be announced by assistive technologies.
|
|
50
|
-
* @param {string} [ariaLive] The politeness level for aria-live; default: 'polite'.
|
|
51
|
-
*
|
|
52
|
-
* @example
|
|
53
|
-
* ```js
|
|
54
|
-
* import { speak } from '@wordpress/a11y';
|
|
55
|
-
*
|
|
56
|
-
* // For polite messages that shouldn't interrupt what screen readers are currently announcing.
|
|
57
|
-
* speak( 'The message you want to send to the ARIA live region' );
|
|
58
|
-
*
|
|
59
|
-
* // For assertive messages that should interrupt what screen readers are currently announcing.
|
|
60
|
-
* speak( 'The message you want to send to the ARIA live region', 'assertive' );
|
|
61
|
-
* ```
|
|
62
|
-
*/
|
|
63
|
-
function speak(message, ariaLive) {
|
|
64
|
-
/*
|
|
65
|
-
* Clear previous messages to allow repeated strings being read out and hide
|
|
66
|
-
* the explanatory text from assistive technologies.
|
|
67
|
-
*/
|
|
68
|
-
(0, _clear.default)();
|
|
69
|
-
message = (0, _filterMessage.default)(message);
|
|
70
|
-
const introText = document.getElementById('a11y-speak-intro-text');
|
|
71
|
-
const containerAssertive = document.getElementById('a11y-speak-assertive');
|
|
72
|
-
const containerPolite = document.getElementById('a11y-speak-polite');
|
|
73
|
-
if (containerAssertive && ariaLive === 'assertive') {
|
|
74
|
-
containerAssertive.textContent = message;
|
|
75
|
-
} else if (containerPolite) {
|
|
76
|
-
containerPolite.textContent = message;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/*
|
|
80
|
-
* Make the explanatory text available to assistive technologies by removing
|
|
81
|
-
* the 'hidden' HTML attribute.
|
|
82
|
-
*/
|
|
83
|
-
if (introText) {
|
|
84
|
-
introText.removeAttribute('hidden');
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
34
|
//# sourceMappingURL=index.js.map
|
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_domReady","_interopRequireDefault","require","
|
|
1
|
+
{"version":3,"names":["_domReady","_interopRequireDefault","require","_i18n","_index","setup","exports","makeSetupFunction","__","domReady"],"sources":["@wordpress/a11y/src/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport domReady from '@wordpress/dom-ready';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { makeSetupFunction } from './shared/index';\nexport { speak } from './shared/index';\n\n/**\n * Create the live regions.\n */\nexport const setup = makeSetupFunction( __( 'Notifications' ) );\n\n/**\n * Run setup on domReady.\n */\ndomReady( setup );\n"],"mappings":";;;;;;;;;;;;;AAGA,IAAAA,SAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAKA,IAAAE,MAAA,GAAAF,OAAA;AATA;AACA;AACA;;AAIA;AACA;AACA;;AAIA;AACA;AACA;AACO,MAAMG,KAAK,GAAAC,OAAA,CAAAD,KAAA,GAAG,IAAAE,wBAAiB,EAAE,IAAAC,QAAE,EAAE,eAAgB,CAAE,CAAC;;AAE/D;AACA;AACA;AACA,IAAAC,iBAAQ,EAAEJ,KAAM,CAAC","ignoreList":[]}
|
package/build/index.native.js
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.speak = speak;
|
|
8
|
-
var _filterMessage = _interopRequireDefault(require("./filter-message"));
|
|
8
|
+
var _filterMessage = _interopRequireDefault(require("./shared/filter-message"));
|
|
9
9
|
/**
|
|
10
10
|
* Internal dependencies
|
|
11
11
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_filterMessage","_interopRequireDefault","require","speak","message","ariaLive","filterMessage"],"sources":["@wordpress/a11y/src/index.native.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport filterMessage from './filter-message';\n\n/**\n * Update the ARIA live notification area text node.\n *\n * @param {string} message The message to be announced by Assistive Technologies.\n * @param {string} [ariaLive] The politeness level for aria-live; default: 'polite'.\n */\nexport function speak( message, ariaLive ) {\n\tmessage = filterMessage( message );\n\t// TODO: Use native module to speak message.\n\tif ( ariaLive === 'assertive' ) {\n\t} else {\n\t}\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,cAAA,GAAAC,sBAAA,CAAAC,OAAA;AAHA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,KAAKA,CAAEC,OAAO,EAAEC,QAAQ,EAAG;EAC1CD,OAAO,GAAG,IAAAE,sBAAa,EAAEF,OAAQ,CAAC;EAClC;EACA,IAAKC,QAAQ,KAAK,WAAW,EAAG,CAChC,CAAC,MAAM,CACP;AACD","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_filterMessage","_interopRequireDefault","require","speak","message","ariaLive","filterMessage"],"sources":["@wordpress/a11y/src/index.native.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport filterMessage from './shared/filter-message';\n\n/**\n * Update the ARIA live notification area text node.\n *\n * @param {string} message The message to be announced by Assistive Technologies.\n * @param {string} [ariaLive] The politeness level for aria-live; default: 'polite'.\n */\nexport function speak( message, ariaLive ) {\n\tmessage = filterMessage( message );\n\t// TODO: Use native module to speak message.\n\tif ( ariaLive === 'assertive' ) {\n\t} else {\n\t}\n}\n"],"mappings":";;;;;;;AAGA,IAAAA,cAAA,GAAAC,sBAAA,CAAAC,OAAA;AAHA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,KAAKA,CAAEC,OAAO,EAAEC,QAAQ,EAAG;EAC1CD,OAAO,GAAG,IAAAE,sBAAa,EAAEF,OAAQ,CAAC;EAClC;EACA,IAAKC,QAAQ,KAAK,WAAW,EAAG,CAChC,CAAC,MAAM,CACP;AACD","ignoreList":[]}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.setup = void 0;
|
|
7
|
+
Object.defineProperty(exports, "speak", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () {
|
|
10
|
+
return _index.speak;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
var _index = require("../shared/index");
|
|
14
|
+
/**
|
|
15
|
+
* Internal dependencies
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
// Without an i18n Script Module, "Notifications" (the only localized text used in this module)
|
|
19
|
+
// will be translated on the server and provided as script-module data.
|
|
20
|
+
let notificationsText = 'Notifications';
|
|
21
|
+
try {
|
|
22
|
+
const textContent = document.getElementById('wp-script-module-data-@wordpress/a11y')?.textContent;
|
|
23
|
+
if (textContent) {
|
|
24
|
+
var _parsed$i18n$Notifica;
|
|
25
|
+
const parsed = JSON.parse(textContent);
|
|
26
|
+
notificationsText = (_parsed$i18n$Notifica = parsed?.i18n?.Notifications) !== null && _parsed$i18n$Notifica !== void 0 ? _parsed$i18n$Notifica : notificationsText;
|
|
27
|
+
}
|
|
28
|
+
} catch {}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Create the live regions.
|
|
32
|
+
*/
|
|
33
|
+
const setup = exports.setup = (0, _index.makeSetupFunction)(notificationsText);
|
|
34
|
+
setup();
|
|
35
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_index","require","notificationsText","textContent","document","getElementById","_parsed$i18n$Notifica","parsed","JSON","parse","i18n","Notifications","setup","exports","makeSetupFunction"],"sources":["@wordpress/a11y/src/module/index.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { makeSetupFunction } from '../shared/index';\nexport { speak } from '../shared/index';\n\n// Without an i18n Script Module, \"Notifications\" (the only localized text used in this module)\n// will be translated on the server and provided as script-module data.\nlet notificationsText = 'Notifications';\ntry {\n\tconst textContent = document.getElementById(\n\t\t'wp-script-module-data-@wordpress/a11y'\n\t)?.textContent;\n\tif ( textContent ) {\n\t\tconst parsed = JSON.parse( textContent );\n\t\tnotificationsText = parsed?.i18n?.Notifications ?? notificationsText;\n\t}\n} catch {}\n\n/**\n * Create the live regions.\n */\nexport const setup = makeSetupFunction( notificationsText );\n\nsetup();\n"],"mappings":";;;;;;;;;;;;AAGA,IAAAA,MAAA,GAAAC,OAAA;AAHA;AACA;AACA;;AAIA;AACA;AACA,IAAIC,iBAAiB,GAAG,eAAe;AACvC,IAAI;EACH,MAAMC,WAAW,GAAGC,QAAQ,CAACC,cAAc,CAC1C,uCACD,CAAC,EAAEF,WAAW;EACd,IAAKA,WAAW,EAAG;IAAA,IAAAG,qBAAA;IAClB,MAAMC,MAAM,GAAGC,IAAI,CAACC,KAAK,CAAEN,WAAY,CAAC;IACxCD,iBAAiB,IAAAI,qBAAA,GAAGC,MAAM,EAAEG,IAAI,EAAEC,aAAa,cAAAL,qBAAA,cAAAA,qBAAA,GAAIJ,iBAAiB;EACrE;AACD,CAAC,CAAC,MAAM,CAAC;;AAET;AACA;AACA;AACO,MAAMU,KAAK,GAAAC,OAAA,CAAAD,KAAA,GAAG,IAAAE,wBAAiB,EAAEZ,iBAAkB,CAAC;AAE3DU,KAAK,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["addContainer","ariaLive","container","document","createElement","id","className","setAttribute","body","appendChild"],"sources":["@wordpress/a11y/src/shared/add-container.js"],"sourcesContent":["/**\n * Build the live regions markup.\n *\n * @param {string} [ariaLive] Value for the 'aria-live' attribute; default: 'polite'.\n *\n * @return {HTMLDivElement} The ARIA live region HTML element.\n */\nexport default function addContainer( ariaLive = 'polite' ) {\n\tconst container = document.createElement( 'div' );\n\tcontainer.id = `a11y-speak-${ ariaLive }`;\n\tcontainer.className = 'a11y-speak-region';\n\n\tcontainer.setAttribute(\n\t\t'style',\n\t\t'position: absolute;' +\n\t\t\t'margin: -1px;' +\n\t\t\t'padding: 0;' +\n\t\t\t'height: 1px;' +\n\t\t\t'width: 1px;' +\n\t\t\t'overflow: hidden;' +\n\t\t\t'clip: rect(1px, 1px, 1px, 1px);' +\n\t\t\t'-webkit-clip-path: inset(50%);' +\n\t\t\t'clip-path: inset(50%);' +\n\t\t\t'border: 0;' +\n\t\t\t'word-wrap: normal !important;'\n\t);\n\tcontainer.setAttribute( 'aria-live', ariaLive );\n\tcontainer.setAttribute( 'aria-relevant', 'additions text' );\n\tcontainer.setAttribute( 'aria-atomic', 'true' );\n\n\tconst { body } = document;\n\tif ( body ) {\n\t\tbody.appendChild( container );\n\t}\n\n\treturn container;\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASA,YAAYA,CAAEC,QAAQ,GAAG,QAAQ,EAAG;EAC3D,MAAMC,SAAS,GAAGC,QAAQ,CAACC,aAAa,CAAE,KAAM,CAAC;EACjDF,SAAS,CAACG,EAAE,GAAI,cAAcJ,QAAU,EAAC;EACzCC,SAAS,CAACI,SAAS,GAAG,mBAAmB;EAEzCJ,SAAS,CAACK,YAAY,CACrB,OAAO,EACP,qBAAqB,GACpB,eAAe,GACf,aAAa,GACb,cAAc,GACd,aAAa,GACb,mBAAmB,GACnB,iCAAiC,GACjC,gCAAgC,GAChC,wBAAwB,GACxB,YAAY,GACZ,+BACF,CAAC;EACDL,SAAS,CAACK,YAAY,CAAE,WAAW,EAAEN,QAAS,CAAC;EAC/CC,SAAS,CAACK,YAAY,CAAE,eAAe,EAAE,gBAAiB,CAAC;EAC3DL,SAAS,CAACK,YAAY,CAAE,aAAa,EAAE,MAAO,CAAC;EAE/C,MAAM;IAAEC;EAAK,CAAC,GAAGL,QAAQ;EACzB,IAAKK,IAAI,EAAG;IACXA,IAAI,CAACC,WAAW,CAAEP,SAAU,CAAC;EAC9B;EAEA,OAAOA,SAAS;AACjB","ignoreList":[]}
|
|
@@ -4,24 +4,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = addIntroText;
|
|
7
|
-
var _i18n = require("@wordpress/i18n");
|
|
8
|
-
/**
|
|
9
|
-
* WordPress dependencies
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
7
|
/**
|
|
13
8
|
* Build the explanatory text to be placed before the aria live regions.
|
|
14
9
|
*
|
|
15
10
|
* This text is initially hidden from assistive technologies by using a `hidden`
|
|
16
11
|
* HTML attribute which is then removed once a message fills the aria-live regions.
|
|
17
12
|
*
|
|
13
|
+
* @param {string} introTextContent The translated intro text content.
|
|
18
14
|
* @return {HTMLParagraphElement} The explanatory text HTML element.
|
|
19
15
|
*/
|
|
20
|
-
function addIntroText() {
|
|
16
|
+
function addIntroText(introTextContent) {
|
|
21
17
|
const introText = document.createElement('p');
|
|
22
18
|
introText.id = 'a11y-speak-intro-text';
|
|
23
19
|
introText.className = 'a11y-speak-intro-text';
|
|
24
|
-
introText.textContent =
|
|
20
|
+
introText.textContent = introTextContent;
|
|
25
21
|
introText.setAttribute('style', 'position: absolute;' + 'margin: -1px;' + 'padding: 0;' + 'height: 1px;' + 'width: 1px;' + 'overflow: hidden;' + 'clip: rect(1px, 1px, 1px, 1px);' + '-webkit-clip-path: inset(50%);' + 'clip-path: inset(50%);' + 'border: 0;' + 'word-wrap: normal !important;');
|
|
26
22
|
introText.setAttribute('hidden', 'hidden');
|
|
27
23
|
const {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["addIntroText","introTextContent","introText","document","createElement","id","className","textContent","setAttribute","body","appendChild"],"sources":["@wordpress/a11y/src/shared/add-intro-text.ts"],"sourcesContent":["/**\n * Build the explanatory text to be placed before the aria live regions.\n *\n * This text is initially hidden from assistive technologies by using a `hidden`\n * HTML attribute which is then removed once a message fills the aria-live regions.\n *\n * @param {string} introTextContent The translated intro text content.\n * @return {HTMLParagraphElement} The explanatory text HTML element.\n */\nexport default function addIntroText( introTextContent: string ) {\n\tconst introText = document.createElement( 'p' );\n\n\tintroText.id = 'a11y-speak-intro-text';\n\tintroText.className = 'a11y-speak-intro-text';\n\tintroText.textContent = introTextContent;\n\n\tintroText.setAttribute(\n\t\t'style',\n\t\t'position: absolute;' +\n\t\t\t'margin: -1px;' +\n\t\t\t'padding: 0;' +\n\t\t\t'height: 1px;' +\n\t\t\t'width: 1px;' +\n\t\t\t'overflow: hidden;' +\n\t\t\t'clip: rect(1px, 1px, 1px, 1px);' +\n\t\t\t'-webkit-clip-path: inset(50%);' +\n\t\t\t'clip-path: inset(50%);' +\n\t\t\t'border: 0;' +\n\t\t\t'word-wrap: normal !important;'\n\t);\n\tintroText.setAttribute( 'hidden', 'hidden' );\n\n\tconst { body } = document;\n\tif ( body ) {\n\t\tbody.appendChild( introText );\n\t}\n\n\treturn introText;\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASA,YAAYA,CAAEC,gBAAwB,EAAG;EAChE,MAAMC,SAAS,GAAGC,QAAQ,CAACC,aAAa,CAAE,GAAI,CAAC;EAE/CF,SAAS,CAACG,EAAE,GAAG,uBAAuB;EACtCH,SAAS,CAACI,SAAS,GAAG,uBAAuB;EAC7CJ,SAAS,CAACK,WAAW,GAAGN,gBAAgB;EAExCC,SAAS,CAACM,YAAY,CACrB,OAAO,EACP,qBAAqB,GACpB,eAAe,GACf,aAAa,GACb,cAAc,GACd,aAAa,GACb,mBAAmB,GACnB,iCAAiC,GACjC,gCAAgC,GAChC,wBAAwB,GACxB,YAAY,GACZ,+BACF,CAAC;EACDN,SAAS,CAACM,YAAY,CAAE,QAAQ,EAAE,QAAS,CAAC;EAE5C,MAAM;IAAEC;EAAK,CAAC,GAAGN,QAAQ;EACzB,IAAKM,IAAI,EAAG;IACXA,IAAI,CAACC,WAAW,CAAER,SAAU,CAAC;EAC9B;EAEA,OAAOA,SAAS;AACjB","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["clear","regions","document","getElementsByClassName","introText","getElementById","i","length","textContent","setAttribute"],"sources":["@wordpress/a11y/src/shared/clear.js"],"sourcesContent":["/**\n * Clears the a11y-speak-region elements and hides the explanatory text.\n */\nexport default function clear() {\n\tconst regions = document.getElementsByClassName( 'a11y-speak-region' );\n\tconst introText = document.getElementById( 'a11y-speak-intro-text' );\n\n\tfor ( let i = 0; i < regions.length; i++ ) {\n\t\tregions[ i ].textContent = '';\n\t}\n\n\t// Make sure the explanatory text is hidden from assistive technologies.\n\tif ( introText ) {\n\t\tintroText.setAttribute( 'hidden', 'hidden' );\n\t}\n}\n"],"mappings":";;;;;;AAAA;AACA;AACA;AACe,SAASA,KAAKA,CAAA,EAAG;EAC/B,MAAMC,OAAO,GAAGC,QAAQ,CAACC,sBAAsB,CAAE,mBAAoB,CAAC;EACtE,MAAMC,SAAS,GAAGF,QAAQ,CAACG,cAAc,CAAE,uBAAwB,CAAC;EAEpE,KAAM,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGL,OAAO,CAACM,MAAM,EAAED,CAAC,EAAE,EAAG;IAC1CL,OAAO,CAAEK,CAAC,CAAE,CAACE,WAAW,GAAG,EAAE;EAC9B;;EAEA;EACA,IAAKJ,SAAS,EAAG;IAChBA,SAAS,CAACK,YAAY,CAAE,QAAQ,EAAE,QAAS,CAAC;EAC7C;AACD","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["previousMessage","filterMessage","message","replace"],"sources":["@wordpress/a11y/src/shared/filter-message.js"],"sourcesContent":["let previousMessage = '';\n\n/**\n * Filter the message to be announced to the screenreader.\n *\n * @param {string} message The message to be announced.\n *\n * @return {string} The filtered message.\n */\nexport default function filterMessage( message ) {\n\t/*\n\t * Strip HTML tags (if any) from the message string. Ideally, messages should\n\t * be simple strings, carefully crafted for specific use with A11ySpeak.\n\t * When re-using already existing strings this will ensure simple HTML to be\n\t * stripped out and replaced with a space. Browsers will collapse multiple\n\t * spaces natively.\n\t */\n\tmessage = message.replace( /<[^<>]+>/g, ' ' );\n\n\t/*\n\t * Safari + VoiceOver don't announce repeated, identical strings. We use\n\t * a `no-break space` to force them to think identical strings are different.\n\t */\n\tif ( previousMessage === message ) {\n\t\tmessage += '\\u00A0';\n\t}\n\n\tpreviousMessage = message;\n\n\treturn message;\n}\n"],"mappings":";;;;;;AAAA,IAAIA,eAAe,GAAG,EAAE;;AAExB;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASC,aAAaA,CAAEC,OAAO,EAAG;EAChD;AACD;AACA;AACA;AACA;AACA;AACA;EACCA,OAAO,GAAGA,OAAO,CAACC,OAAO,CAAE,WAAW,EAAE,GAAI,CAAC;;EAE7C;AACD;AACA;AACA;EACC,IAAKH,eAAe,KAAKE,OAAO,EAAG;IAClCA,OAAO,IAAI,QAAQ;EACpB;EAEAF,eAAe,GAAGE,OAAO;EAEzB,OAAOA,OAAO;AACf","ignoreList":[]}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.makeSetupFunction = makeSetupFunction;
|
|
8
|
+
exports.speak = speak;
|
|
9
|
+
var _addContainer = _interopRequireDefault(require("./add-container"));
|
|
10
|
+
var _addIntroText = _interopRequireDefault(require("./add-intro-text"));
|
|
11
|
+
var _clear = _interopRequireDefault(require("./clear"));
|
|
12
|
+
var _filterMessage = _interopRequireDefault(require("./filter-message"));
|
|
13
|
+
/**
|
|
14
|
+
* Internal dependencies
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Create the live regions.
|
|
19
|
+
* @param {string} introTextContent The intro text content.
|
|
20
|
+
*/
|
|
21
|
+
function makeSetupFunction(introTextContent) {
|
|
22
|
+
return function setup() {
|
|
23
|
+
const introText = document.getElementById('a11y-speak-intro-text');
|
|
24
|
+
const containerAssertive = document.getElementById('a11y-speak-assertive');
|
|
25
|
+
const containerPolite = document.getElementById('a11y-speak-polite');
|
|
26
|
+
if (introText === null) {
|
|
27
|
+
(0, _addIntroText.default)(introTextContent);
|
|
28
|
+
}
|
|
29
|
+
if (containerAssertive === null) {
|
|
30
|
+
(0, _addContainer.default)('assertive');
|
|
31
|
+
}
|
|
32
|
+
if (containerPolite === null) {
|
|
33
|
+
(0, _addContainer.default)('polite');
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Allows you to easily announce dynamic interface updates to screen readers using ARIA live regions.
|
|
40
|
+
* This module is inspired by the `speak` function in `wp-a11y.js`.
|
|
41
|
+
*
|
|
42
|
+
* @param {string} message The message to be announced by assistive technologies.
|
|
43
|
+
* @param {'polite'|'assertive'} [ariaLive] The politeness level for aria-live; default: 'polite'.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* ```js
|
|
47
|
+
* import { speak } from '@wordpress/a11y';
|
|
48
|
+
*
|
|
49
|
+
* // For polite messages that shouldn't interrupt what screen readers are currently announcing.
|
|
50
|
+
* speak( 'The message you want to send to the ARIA live region' );
|
|
51
|
+
*
|
|
52
|
+
* // For assertive messages that should interrupt what screen readers are currently announcing.
|
|
53
|
+
* speak( 'The message you want to send to the ARIA live region', 'assertive' );
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
function speak(message, ariaLive) {
|
|
57
|
+
/*
|
|
58
|
+
* Clear previous messages to allow repeated strings being read out and hide
|
|
59
|
+
* the explanatory text from assistive technologies.
|
|
60
|
+
*/
|
|
61
|
+
(0, _clear.default)();
|
|
62
|
+
message = (0, _filterMessage.default)(message);
|
|
63
|
+
const introText = document.getElementById('a11y-speak-intro-text');
|
|
64
|
+
const containerAssertive = document.getElementById('a11y-speak-assertive');
|
|
65
|
+
const containerPolite = document.getElementById('a11y-speak-polite');
|
|
66
|
+
if (containerAssertive && ariaLive === 'assertive') {
|
|
67
|
+
containerAssertive.textContent = message;
|
|
68
|
+
} else if (containerPolite) {
|
|
69
|
+
containerPolite.textContent = message;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/*
|
|
73
|
+
* Make the explanatory text available to assistive technologies by removing
|
|
74
|
+
* the 'hidden' HTML attribute.
|
|
75
|
+
*/
|
|
76
|
+
if (introText) {
|
|
77
|
+
introText.removeAttribute('hidden');
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_addContainer","_interopRequireDefault","require","_addIntroText","_clear","_filterMessage","makeSetupFunction","introTextContent","setup","introText","document","getElementById","containerAssertive","containerPolite","addIntroText","addContainer","speak","message","ariaLive","clear","filterMessage","textContent","removeAttribute"],"sources":["@wordpress/a11y/src/shared/index.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport addContainer from './add-container';\nimport addIntroText from './add-intro-text';\nimport clear from './clear';\nimport filterMessage from './filter-message';\n\n/**\n * Create the live regions.\n * @param {string} introTextContent The intro text content.\n */\nexport function makeSetupFunction( introTextContent ) {\n\treturn function setup() {\n\t\tconst introText = document.getElementById( 'a11y-speak-intro-text' );\n\t\tconst containerAssertive = document.getElementById(\n\t\t\t'a11y-speak-assertive'\n\t\t);\n\t\tconst containerPolite = document.getElementById( 'a11y-speak-polite' );\n\n\t\tif ( introText === null ) {\n\t\t\taddIntroText( introTextContent );\n\t\t}\n\n\t\tif ( containerAssertive === null ) {\n\t\t\taddContainer( 'assertive' );\n\t\t}\n\n\t\tif ( containerPolite === null ) {\n\t\t\taddContainer( 'polite' );\n\t\t}\n\t};\n}\n\n/**\n * Allows you to easily announce dynamic interface updates to screen readers using ARIA live regions.\n * This module is inspired by the `speak` function in `wp-a11y.js`.\n *\n * @param {string} message The message to be announced by assistive technologies.\n * @param {'polite'|'assertive'} [ariaLive] The politeness level for aria-live; default: 'polite'.\n *\n * @example\n * ```js\n * import { speak } from '@wordpress/a11y';\n *\n * // For polite messages that shouldn't interrupt what screen readers are currently announcing.\n * speak( 'The message you want to send to the ARIA live region' );\n *\n * // For assertive messages that should interrupt what screen readers are currently announcing.\n * speak( 'The message you want to send to the ARIA live region', 'assertive' );\n * ```\n */\nexport function speak( message, ariaLive ) {\n\t/*\n\t * Clear previous messages to allow repeated strings being read out and hide\n\t * the explanatory text from assistive technologies.\n\t */\n\tclear();\n\n\tmessage = filterMessage( message );\n\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 ( containerAssertive && ariaLive === 'assertive' ) {\n\t\tcontainerAssertive.textContent = message;\n\t} else if ( containerPolite ) {\n\t\tcontainerPolite.textContent = message;\n\t}\n\n\t/*\n\t * Make the explanatory text available to assistive technologies by removing\n\t * the 'hidden' HTML attribute.\n\t */\n\tif ( introText ) {\n\t\tintroText.removeAttribute( 'hidden' );\n\t}\n}\n"],"mappings":";;;;;;;;AAGA,IAAAA,aAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,aAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,MAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,cAAA,GAAAJ,sBAAA,CAAAC,OAAA;AANA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACO,SAASI,iBAAiBA,CAAEC,gBAAgB,EAAG;EACrD,OAAO,SAASC,KAAKA,CAAA,EAAG;IACvB,MAAMC,SAAS,GAAGC,QAAQ,CAACC,cAAc,CAAE,uBAAwB,CAAC;IACpE,MAAMC,kBAAkB,GAAGF,QAAQ,CAACC,cAAc,CACjD,sBACD,CAAC;IACD,MAAME,eAAe,GAAGH,QAAQ,CAACC,cAAc,CAAE,mBAAoB,CAAC;IAEtE,IAAKF,SAAS,KAAK,IAAI,EAAG;MACzB,IAAAK,qBAAY,EAAEP,gBAAiB,CAAC;IACjC;IAEA,IAAKK,kBAAkB,KAAK,IAAI,EAAG;MAClC,IAAAG,qBAAY,EAAE,WAAY,CAAC;IAC5B;IAEA,IAAKF,eAAe,KAAK,IAAI,EAAG;MAC/B,IAAAE,qBAAY,EAAE,QAAS,CAAC;IACzB;EACD,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASC,KAAKA,CAAEC,OAAO,EAAEC,QAAQ,EAAG;EAC1C;AACD;AACA;AACA;EACC,IAAAC,cAAK,EAAC,CAAC;EAEPF,OAAO,GAAG,IAAAG,sBAAa,EAAEH,OAAQ,CAAC;EAElC,MAAMR,SAAS,GAAGC,QAAQ,CAACC,cAAc,CAAE,uBAAwB,CAAC;EACpE,MAAMC,kBAAkB,GAAGF,QAAQ,CAACC,cAAc,CACjD,sBACD,CAAC;EACD,MAAME,eAAe,GAAGH,QAAQ,CAACC,cAAc,CAAE,mBAAoB,CAAC;EAEtE,IAAKC,kBAAkB,IAAIM,QAAQ,KAAK,WAAW,EAAG;IACrDN,kBAAkB,CAACS,WAAW,GAAGJ,OAAO;EACzC,CAAC,MAAM,IAAKJ,eAAe,EAAG;IAC7BA,eAAe,CAACQ,WAAW,GAAGJ,OAAO;EACtC;;EAEA;AACD;AACA;AACA;EACC,IAAKR,SAAS,EAAG;IAChBA,SAAS,CAACa,eAAe,CAAE,QAAS,CAAC;EACtC;AACD","ignoreList":[]}
|
package/build-module/index.js
CHANGED
|
@@ -2,78 +2,21 @@
|
|
|
2
2
|
* WordPress dependencies
|
|
3
3
|
*/
|
|
4
4
|
import domReady from '@wordpress/dom-ready';
|
|
5
|
+
import { __ } from '@wordpress/i18n';
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* Internal dependencies
|
|
8
9
|
*/
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
import clear from './clear';
|
|
12
|
-
import filterMessage from './filter-message';
|
|
10
|
+
import { makeSetupFunction } from './shared/index';
|
|
11
|
+
export { speak } from './shared/index';
|
|
13
12
|
|
|
14
13
|
/**
|
|
15
14
|
* Create the live regions.
|
|
16
15
|
*/
|
|
17
|
-
export
|
|
18
|
-
const introText = document.getElementById('a11y-speak-intro-text');
|
|
19
|
-
const containerAssertive = document.getElementById('a11y-speak-assertive');
|
|
20
|
-
const containerPolite = document.getElementById('a11y-speak-polite');
|
|
21
|
-
if (introText === null) {
|
|
22
|
-
addIntroText();
|
|
23
|
-
}
|
|
24
|
-
if (containerAssertive === null) {
|
|
25
|
-
addContainer('assertive');
|
|
26
|
-
}
|
|
27
|
-
if (containerPolite === null) {
|
|
28
|
-
addContainer('polite');
|
|
29
|
-
}
|
|
30
|
-
}
|
|
16
|
+
export const setup = makeSetupFunction(__('Notifications'));
|
|
31
17
|
|
|
32
18
|
/**
|
|
33
19
|
* Run setup on domReady.
|
|
34
20
|
*/
|
|
35
21
|
domReady(setup);
|
|
36
|
-
|
|
37
|
-
/**
|
|
38
|
-
* Allows you to easily announce dynamic interface updates to screen readers using ARIA live regions.
|
|
39
|
-
* This module is inspired by the `speak` function in `wp-a11y.js`.
|
|
40
|
-
*
|
|
41
|
-
* @param {string} message The message to be announced by assistive technologies.
|
|
42
|
-
* @param {string} [ariaLive] The politeness level for aria-live; default: 'polite'.
|
|
43
|
-
*
|
|
44
|
-
* @example
|
|
45
|
-
* ```js
|
|
46
|
-
* import { speak } from '@wordpress/a11y';
|
|
47
|
-
*
|
|
48
|
-
* // For polite messages that shouldn't interrupt what screen readers are currently announcing.
|
|
49
|
-
* speak( 'The message you want to send to the ARIA live region' );
|
|
50
|
-
*
|
|
51
|
-
* // For assertive messages that should interrupt what screen readers are currently announcing.
|
|
52
|
-
* speak( 'The message you want to send to the ARIA live region', 'assertive' );
|
|
53
|
-
* ```
|
|
54
|
-
*/
|
|
55
|
-
export function speak(message, ariaLive) {
|
|
56
|
-
/*
|
|
57
|
-
* Clear previous messages to allow repeated strings being read out and hide
|
|
58
|
-
* the explanatory text from assistive technologies.
|
|
59
|
-
*/
|
|
60
|
-
clear();
|
|
61
|
-
message = filterMessage(message);
|
|
62
|
-
const introText = document.getElementById('a11y-speak-intro-text');
|
|
63
|
-
const containerAssertive = document.getElementById('a11y-speak-assertive');
|
|
64
|
-
const containerPolite = document.getElementById('a11y-speak-polite');
|
|
65
|
-
if (containerAssertive && ariaLive === 'assertive') {
|
|
66
|
-
containerAssertive.textContent = message;
|
|
67
|
-
} else if (containerPolite) {
|
|
68
|
-
containerPolite.textContent = message;
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/*
|
|
72
|
-
* Make the explanatory text available to assistive technologies by removing
|
|
73
|
-
* the 'hidden' HTML attribute.
|
|
74
|
-
*/
|
|
75
|
-
if (introText) {
|
|
76
|
-
introText.removeAttribute('hidden');
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
22
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["domReady","
|
|
1
|
+
{"version":3,"names":["domReady","__","makeSetupFunction","speak","setup"],"sources":["@wordpress/a11y/src/index.js"],"sourcesContent":["/**\n * WordPress dependencies\n */\nimport domReady from '@wordpress/dom-ready';\nimport { __ } from '@wordpress/i18n';\n\n/**\n * Internal dependencies\n */\nimport { makeSetupFunction } from './shared/index';\nexport { speak } from './shared/index';\n\n/**\n * Create the live regions.\n */\nexport const setup = makeSetupFunction( __( 'Notifications' ) );\n\n/**\n * Run setup on domReady.\n */\ndomReady( setup );\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,QAAQ,MAAM,sBAAsB;AAC3C,SAASC,EAAE,QAAQ,iBAAiB;;AAEpC;AACA;AACA;AACA,SAASC,iBAAiB,QAAQ,gBAAgB;AAClD,SAASC,KAAK,QAAQ,gBAAgB;;AAEtC;AACA;AACA;AACA,OAAO,MAAMC,KAAK,GAAGF,iBAAiB,CAAED,EAAE,CAAE,eAAgB,CAAE,CAAC;;AAE/D;AACA;AACA;AACAD,QAAQ,CAAEI,KAAM,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["filterMessage","speak","message","ariaLive"],"sources":["@wordpress/a11y/src/index.native.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport filterMessage from './filter-message';\n\n/**\n * Update the ARIA live notification area text node.\n *\n * @param {string} message The message to be announced by Assistive Technologies.\n * @param {string} [ariaLive] The politeness level for aria-live; default: 'polite'.\n */\nexport function speak( message, ariaLive ) {\n\tmessage = filterMessage( message );\n\t// TODO: Use native module to speak message.\n\tif ( ariaLive === 'assertive' ) {\n\t} else {\n\t}\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,aAAa,MAAM,
|
|
1
|
+
{"version":3,"names":["filterMessage","speak","message","ariaLive"],"sources":["@wordpress/a11y/src/index.native.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport filterMessage from './shared/filter-message';\n\n/**\n * Update the ARIA live notification area text node.\n *\n * @param {string} message The message to be announced by Assistive Technologies.\n * @param {string} [ariaLive] The politeness level for aria-live; default: 'polite'.\n */\nexport function speak( message, ariaLive ) {\n\tmessage = filterMessage( message );\n\t// TODO: Use native module to speak message.\n\tif ( ariaLive === 'assertive' ) {\n\t} else {\n\t}\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,aAAa,MAAM,yBAAyB;;AAEnD;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,KAAKA,CAAEC,OAAO,EAAEC,QAAQ,EAAG;EAC1CD,OAAO,GAAGF,aAAa,CAAEE,OAAQ,CAAC;EAClC;EACA,IAAKC,QAAQ,KAAK,WAAW,EAAG,CAChC,CAAC,MAAM,CACP;AACD","ignoreList":[]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal dependencies
|
|
3
|
+
*/
|
|
4
|
+
import { makeSetupFunction } from '../shared/index';
|
|
5
|
+
export { speak } from '../shared/index';
|
|
6
|
+
|
|
7
|
+
// Without an i18n Script Module, "Notifications" (the only localized text used in this module)
|
|
8
|
+
// will be translated on the server and provided as script-module data.
|
|
9
|
+
let notificationsText = 'Notifications';
|
|
10
|
+
try {
|
|
11
|
+
const textContent = document.getElementById('wp-script-module-data-@wordpress/a11y')?.textContent;
|
|
12
|
+
if (textContent) {
|
|
13
|
+
var _parsed$i18n$Notifica;
|
|
14
|
+
const parsed = JSON.parse(textContent);
|
|
15
|
+
notificationsText = (_parsed$i18n$Notifica = parsed?.i18n?.Notifications) !== null && _parsed$i18n$Notifica !== void 0 ? _parsed$i18n$Notifica : notificationsText;
|
|
16
|
+
}
|
|
17
|
+
} catch {}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Create the live regions.
|
|
21
|
+
*/
|
|
22
|
+
export const setup = makeSetupFunction(notificationsText);
|
|
23
|
+
setup();
|
|
24
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["makeSetupFunction","speak","notificationsText","textContent","document","getElementById","_parsed$i18n$Notifica","parsed","JSON","parse","i18n","Notifications","setup"],"sources":["@wordpress/a11y/src/module/index.ts"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport { makeSetupFunction } from '../shared/index';\nexport { speak } from '../shared/index';\n\n// Without an i18n Script Module, \"Notifications\" (the only localized text used in this module)\n// will be translated on the server and provided as script-module data.\nlet notificationsText = 'Notifications';\ntry {\n\tconst textContent = document.getElementById(\n\t\t'wp-script-module-data-@wordpress/a11y'\n\t)?.textContent;\n\tif ( textContent ) {\n\t\tconst parsed = JSON.parse( textContent );\n\t\tnotificationsText = parsed?.i18n?.Notifications ?? notificationsText;\n\t}\n} catch {}\n\n/**\n * Create the live regions.\n */\nexport const setup = makeSetupFunction( notificationsText );\n\nsetup();\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,iBAAiB,QAAQ,iBAAiB;AACnD,SAASC,KAAK,QAAQ,iBAAiB;;AAEvC;AACA;AACA,IAAIC,iBAAiB,GAAG,eAAe;AACvC,IAAI;EACH,MAAMC,WAAW,GAAGC,QAAQ,CAACC,cAAc,CAC1C,uCACD,CAAC,EAAEF,WAAW;EACd,IAAKA,WAAW,EAAG;IAAA,IAAAG,qBAAA;IAClB,MAAMC,MAAM,GAAGC,IAAI,CAACC,KAAK,CAAEN,WAAY,CAAC;IACxCD,iBAAiB,IAAAI,qBAAA,GAAGC,MAAM,EAAEG,IAAI,EAAEC,aAAa,cAAAL,qBAAA,cAAAA,qBAAA,GAAIJ,iBAAiB;EACrE;AACD,CAAC,CAAC,MAAM,CAAC;;AAET;AACA;AACA;AACA,OAAO,MAAMU,KAAK,GAAGZ,iBAAiB,CAAEE,iBAAkB,CAAC;AAE3DU,KAAK,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["addContainer","ariaLive","container","document","createElement","id","className","setAttribute","body","appendChild"],"sources":["@wordpress/a11y/src/shared/add-container.js"],"sourcesContent":["/**\n * Build the live regions markup.\n *\n * @param {string} [ariaLive] Value for the 'aria-live' attribute; default: 'polite'.\n *\n * @return {HTMLDivElement} The ARIA live region HTML element.\n */\nexport default function addContainer( ariaLive = 'polite' ) {\n\tconst container = document.createElement( 'div' );\n\tcontainer.id = `a11y-speak-${ ariaLive }`;\n\tcontainer.className = 'a11y-speak-region';\n\n\tcontainer.setAttribute(\n\t\t'style',\n\t\t'position: absolute;' +\n\t\t\t'margin: -1px;' +\n\t\t\t'padding: 0;' +\n\t\t\t'height: 1px;' +\n\t\t\t'width: 1px;' +\n\t\t\t'overflow: hidden;' +\n\t\t\t'clip: rect(1px, 1px, 1px, 1px);' +\n\t\t\t'-webkit-clip-path: inset(50%);' +\n\t\t\t'clip-path: inset(50%);' +\n\t\t\t'border: 0;' +\n\t\t\t'word-wrap: normal !important;'\n\t);\n\tcontainer.setAttribute( 'aria-live', ariaLive );\n\tcontainer.setAttribute( 'aria-relevant', 'additions text' );\n\tcontainer.setAttribute( 'aria-atomic', 'true' );\n\n\tconst { body } = document;\n\tif ( body ) {\n\t\tbody.appendChild( container );\n\t}\n\n\treturn container;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASA,YAAYA,CAAEC,QAAQ,GAAG,QAAQ,EAAG;EAC3D,MAAMC,SAAS,GAAGC,QAAQ,CAACC,aAAa,CAAE,KAAM,CAAC;EACjDF,SAAS,CAACG,EAAE,GAAI,cAAcJ,QAAU,EAAC;EACzCC,SAAS,CAACI,SAAS,GAAG,mBAAmB;EAEzCJ,SAAS,CAACK,YAAY,CACrB,OAAO,EACP,qBAAqB,GACpB,eAAe,GACf,aAAa,GACb,cAAc,GACd,aAAa,GACb,mBAAmB,GACnB,iCAAiC,GACjC,gCAAgC,GAChC,wBAAwB,GACxB,YAAY,GACZ,+BACF,CAAC;EACDL,SAAS,CAACK,YAAY,CAAE,WAAW,EAAEN,QAAS,CAAC;EAC/CC,SAAS,CAACK,YAAY,CAAE,eAAe,EAAE,gBAAiB,CAAC;EAC3DL,SAAS,CAACK,YAAY,CAAE,aAAa,EAAE,MAAO,CAAC;EAE/C,MAAM;IAAEC;EAAK,CAAC,GAAGL,QAAQ;EACzB,IAAKK,IAAI,EAAG;IACXA,IAAI,CAACC,WAAW,CAAEP,SAAU,CAAC;EAC9B;EAEA,OAAOA,SAAS;AACjB","ignoreList":[]}
|
|
@@ -1,21 +1,17 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* WordPress dependencies
|
|
3
|
-
*/
|
|
4
|
-
import { __ } from '@wordpress/i18n';
|
|
5
|
-
|
|
6
1
|
/**
|
|
7
2
|
* Build the explanatory text to be placed before the aria live regions.
|
|
8
3
|
*
|
|
9
4
|
* This text is initially hidden from assistive technologies by using a `hidden`
|
|
10
5
|
* HTML attribute which is then removed once a message fills the aria-live regions.
|
|
11
6
|
*
|
|
7
|
+
* @param {string} introTextContent The translated intro text content.
|
|
12
8
|
* @return {HTMLParagraphElement} The explanatory text HTML element.
|
|
13
9
|
*/
|
|
14
|
-
export default function addIntroText() {
|
|
10
|
+
export default function addIntroText(introTextContent) {
|
|
15
11
|
const introText = document.createElement('p');
|
|
16
12
|
introText.id = 'a11y-speak-intro-text';
|
|
17
13
|
introText.className = 'a11y-speak-intro-text';
|
|
18
|
-
introText.textContent =
|
|
14
|
+
introText.textContent = introTextContent;
|
|
19
15
|
introText.setAttribute('style', 'position: absolute;' + 'margin: -1px;' + 'padding: 0;' + 'height: 1px;' + 'width: 1px;' + 'overflow: hidden;' + 'clip: rect(1px, 1px, 1px, 1px);' + '-webkit-clip-path: inset(50%);' + 'clip-path: inset(50%);' + 'border: 0;' + 'word-wrap: normal !important;');
|
|
20
16
|
introText.setAttribute('hidden', 'hidden');
|
|
21
17
|
const {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["addIntroText","introTextContent","introText","document","createElement","id","className","textContent","setAttribute","body","appendChild"],"sources":["@wordpress/a11y/src/shared/add-intro-text.ts"],"sourcesContent":["/**\n * Build the explanatory text to be placed before the aria live regions.\n *\n * This text is initially hidden from assistive technologies by using a `hidden`\n * HTML attribute which is then removed once a message fills the aria-live regions.\n *\n * @param {string} introTextContent The translated intro text content.\n * @return {HTMLParagraphElement} The explanatory text HTML element.\n */\nexport default function addIntroText( introTextContent: string ) {\n\tconst introText = document.createElement( 'p' );\n\n\tintroText.id = 'a11y-speak-intro-text';\n\tintroText.className = 'a11y-speak-intro-text';\n\tintroText.textContent = introTextContent;\n\n\tintroText.setAttribute(\n\t\t'style',\n\t\t'position: absolute;' +\n\t\t\t'margin: -1px;' +\n\t\t\t'padding: 0;' +\n\t\t\t'height: 1px;' +\n\t\t\t'width: 1px;' +\n\t\t\t'overflow: hidden;' +\n\t\t\t'clip: rect(1px, 1px, 1px, 1px);' +\n\t\t\t'-webkit-clip-path: inset(50%);' +\n\t\t\t'clip-path: inset(50%);' +\n\t\t\t'border: 0;' +\n\t\t\t'word-wrap: normal !important;'\n\t);\n\tintroText.setAttribute( 'hidden', 'hidden' );\n\n\tconst { body } = document;\n\tif ( body ) {\n\t\tbody.appendChild( introText );\n\t}\n\n\treturn introText;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASA,YAAYA,CAAEC,gBAAwB,EAAG;EAChE,MAAMC,SAAS,GAAGC,QAAQ,CAACC,aAAa,CAAE,GAAI,CAAC;EAE/CF,SAAS,CAACG,EAAE,GAAG,uBAAuB;EACtCH,SAAS,CAACI,SAAS,GAAG,uBAAuB;EAC7CJ,SAAS,CAACK,WAAW,GAAGN,gBAAgB;EAExCC,SAAS,CAACM,YAAY,CACrB,OAAO,EACP,qBAAqB,GACpB,eAAe,GACf,aAAa,GACb,cAAc,GACd,aAAa,GACb,mBAAmB,GACnB,iCAAiC,GACjC,gCAAgC,GAChC,wBAAwB,GACxB,YAAY,GACZ,+BACF,CAAC;EACDN,SAAS,CAACM,YAAY,CAAE,QAAQ,EAAE,QAAS,CAAC;EAE5C,MAAM;IAAEC;EAAK,CAAC,GAAGN,QAAQ;EACzB,IAAKM,IAAI,EAAG;IACXA,IAAI,CAACC,WAAW,CAAER,SAAU,CAAC;EAC9B;EAEA,OAAOA,SAAS;AACjB","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["clear","regions","document","getElementsByClassName","introText","getElementById","i","length","textContent","setAttribute"],"sources":["@wordpress/a11y/src/shared/clear.js"],"sourcesContent":["/**\n * Clears the a11y-speak-region elements and hides the explanatory text.\n */\nexport default function clear() {\n\tconst regions = document.getElementsByClassName( 'a11y-speak-region' );\n\tconst introText = document.getElementById( 'a11y-speak-intro-text' );\n\n\tfor ( let i = 0; i < regions.length; i++ ) {\n\t\tregions[ i ].textContent = '';\n\t}\n\n\t// Make sure the explanatory text is hidden from assistive technologies.\n\tif ( introText ) {\n\t\tintroText.setAttribute( 'hidden', 'hidden' );\n\t}\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,eAAe,SAASA,KAAKA,CAAA,EAAG;EAC/B,MAAMC,OAAO,GAAGC,QAAQ,CAACC,sBAAsB,CAAE,mBAAoB,CAAC;EACtE,MAAMC,SAAS,GAAGF,QAAQ,CAACG,cAAc,CAAE,uBAAwB,CAAC;EAEpE,KAAM,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGL,OAAO,CAACM,MAAM,EAAED,CAAC,EAAE,EAAG;IAC1CL,OAAO,CAAEK,CAAC,CAAE,CAACE,WAAW,GAAG,EAAE;EAC9B;;EAEA;EACA,IAAKJ,SAAS,EAAG;IAChBA,SAAS,CAACK,YAAY,CAAE,QAAQ,EAAE,QAAS,CAAC;EAC7C;AACD","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["previousMessage","filterMessage","message","replace"],"sources":["@wordpress/a11y/src/shared/filter-message.js"],"sourcesContent":["let previousMessage = '';\n\n/**\n * Filter the message to be announced to the screenreader.\n *\n * @param {string} message The message to be announced.\n *\n * @return {string} The filtered message.\n */\nexport default function filterMessage( message ) {\n\t/*\n\t * Strip HTML tags (if any) from the message string. Ideally, messages should\n\t * be simple strings, carefully crafted for specific use with A11ySpeak.\n\t * When re-using already existing strings this will ensure simple HTML to be\n\t * stripped out and replaced with a space. Browsers will collapse multiple\n\t * spaces natively.\n\t */\n\tmessage = message.replace( /<[^<>]+>/g, ' ' );\n\n\t/*\n\t * Safari + VoiceOver don't announce repeated, identical strings. We use\n\t * a `no-break space` to force them to think identical strings are different.\n\t */\n\tif ( previousMessage === message ) {\n\t\tmessage += '\\u00A0';\n\t}\n\n\tpreviousMessage = message;\n\n\treturn message;\n}\n"],"mappings":"AAAA,IAAIA,eAAe,GAAG,EAAE;;AAExB;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,aAAaA,CAAEC,OAAO,EAAG;EAChD;AACD;AACA;AACA;AACA;AACA;AACA;EACCA,OAAO,GAAGA,OAAO,CAACC,OAAO,CAAE,WAAW,EAAE,GAAI,CAAC;;EAE7C;AACD;AACA;AACA;EACC,IAAKH,eAAe,KAAKE,OAAO,EAAG;IAClCA,OAAO,IAAI,QAAQ;EACpB;EAEAF,eAAe,GAAGE,OAAO;EAEzB,OAAOA,OAAO;AACf","ignoreList":[]}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal dependencies
|
|
3
|
+
*/
|
|
4
|
+
import addContainer from './add-container';
|
|
5
|
+
import addIntroText from './add-intro-text';
|
|
6
|
+
import clear from './clear';
|
|
7
|
+
import filterMessage from './filter-message';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Create the live regions.
|
|
11
|
+
* @param {string} introTextContent The intro text content.
|
|
12
|
+
*/
|
|
13
|
+
export function makeSetupFunction(introTextContent) {
|
|
14
|
+
return function setup() {
|
|
15
|
+
const introText = document.getElementById('a11y-speak-intro-text');
|
|
16
|
+
const containerAssertive = document.getElementById('a11y-speak-assertive');
|
|
17
|
+
const containerPolite = document.getElementById('a11y-speak-polite');
|
|
18
|
+
if (introText === null) {
|
|
19
|
+
addIntroText(introTextContent);
|
|
20
|
+
}
|
|
21
|
+
if (containerAssertive === null) {
|
|
22
|
+
addContainer('assertive');
|
|
23
|
+
}
|
|
24
|
+
if (containerPolite === null) {
|
|
25
|
+
addContainer('polite');
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Allows you to easily announce dynamic interface updates to screen readers using ARIA live regions.
|
|
32
|
+
* This module is inspired by the `speak` function in `wp-a11y.js`.
|
|
33
|
+
*
|
|
34
|
+
* @param {string} message The message to be announced by assistive technologies.
|
|
35
|
+
* @param {'polite'|'assertive'} [ariaLive] The politeness level for aria-live; default: 'polite'.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```js
|
|
39
|
+
* import { speak } from '@wordpress/a11y';
|
|
40
|
+
*
|
|
41
|
+
* // For polite messages that shouldn't interrupt what screen readers are currently announcing.
|
|
42
|
+
* speak( 'The message you want to send to the ARIA live region' );
|
|
43
|
+
*
|
|
44
|
+
* // For assertive messages that should interrupt what screen readers are currently announcing.
|
|
45
|
+
* speak( 'The message you want to send to the ARIA live region', 'assertive' );
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
export function speak(message, ariaLive) {
|
|
49
|
+
/*
|
|
50
|
+
* Clear previous messages to allow repeated strings being read out and hide
|
|
51
|
+
* the explanatory text from assistive technologies.
|
|
52
|
+
*/
|
|
53
|
+
clear();
|
|
54
|
+
message = filterMessage(message);
|
|
55
|
+
const introText = document.getElementById('a11y-speak-intro-text');
|
|
56
|
+
const containerAssertive = document.getElementById('a11y-speak-assertive');
|
|
57
|
+
const containerPolite = document.getElementById('a11y-speak-polite');
|
|
58
|
+
if (containerAssertive && ariaLive === 'assertive') {
|
|
59
|
+
containerAssertive.textContent = message;
|
|
60
|
+
} else if (containerPolite) {
|
|
61
|
+
containerPolite.textContent = message;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/*
|
|
65
|
+
* Make the explanatory text available to assistive technologies by removing
|
|
66
|
+
* the 'hidden' HTML attribute.
|
|
67
|
+
*/
|
|
68
|
+
if (introText) {
|
|
69
|
+
introText.removeAttribute('hidden');
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["addContainer","addIntroText","clear","filterMessage","makeSetupFunction","introTextContent","setup","introText","document","getElementById","containerAssertive","containerPolite","speak","message","ariaLive","textContent","removeAttribute"],"sources":["@wordpress/a11y/src/shared/index.js"],"sourcesContent":["/**\n * Internal dependencies\n */\nimport addContainer from './add-container';\nimport addIntroText from './add-intro-text';\nimport clear from './clear';\nimport filterMessage from './filter-message';\n\n/**\n * Create the live regions.\n * @param {string} introTextContent The intro text content.\n */\nexport function makeSetupFunction( introTextContent ) {\n\treturn function setup() {\n\t\tconst introText = document.getElementById( 'a11y-speak-intro-text' );\n\t\tconst containerAssertive = document.getElementById(\n\t\t\t'a11y-speak-assertive'\n\t\t);\n\t\tconst containerPolite = document.getElementById( 'a11y-speak-polite' );\n\n\t\tif ( introText === null ) {\n\t\t\taddIntroText( introTextContent );\n\t\t}\n\n\t\tif ( containerAssertive === null ) {\n\t\t\taddContainer( 'assertive' );\n\t\t}\n\n\t\tif ( containerPolite === null ) {\n\t\t\taddContainer( 'polite' );\n\t\t}\n\t};\n}\n\n/**\n * Allows you to easily announce dynamic interface updates to screen readers using ARIA live regions.\n * This module is inspired by the `speak` function in `wp-a11y.js`.\n *\n * @param {string} message The message to be announced by assistive technologies.\n * @param {'polite'|'assertive'} [ariaLive] The politeness level for aria-live; default: 'polite'.\n *\n * @example\n * ```js\n * import { speak } from '@wordpress/a11y';\n *\n * // For polite messages that shouldn't interrupt what screen readers are currently announcing.\n * speak( 'The message you want to send to the ARIA live region' );\n *\n * // For assertive messages that should interrupt what screen readers are currently announcing.\n * speak( 'The message you want to send to the ARIA live region', 'assertive' );\n * ```\n */\nexport function speak( message, ariaLive ) {\n\t/*\n\t * Clear previous messages to allow repeated strings being read out and hide\n\t * the explanatory text from assistive technologies.\n\t */\n\tclear();\n\n\tmessage = filterMessage( message );\n\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 ( containerAssertive && ariaLive === 'assertive' ) {\n\t\tcontainerAssertive.textContent = message;\n\t} else if ( containerPolite ) {\n\t\tcontainerPolite.textContent = message;\n\t}\n\n\t/*\n\t * Make the explanatory text available to assistive technologies by removing\n\t * the 'hidden' HTML attribute.\n\t */\n\tif ( introText ) {\n\t\tintroText.removeAttribute( 'hidden' );\n\t}\n}\n"],"mappings":"AAAA;AACA;AACA;AACA,OAAOA,YAAY,MAAM,iBAAiB;AAC1C,OAAOC,YAAY,MAAM,kBAAkB;AAC3C,OAAOC,KAAK,MAAM,SAAS;AAC3B,OAAOC,aAAa,MAAM,kBAAkB;;AAE5C;AACA;AACA;AACA;AACA,OAAO,SAASC,iBAAiBA,CAAEC,gBAAgB,EAAG;EACrD,OAAO,SAASC,KAAKA,CAAA,EAAG;IACvB,MAAMC,SAAS,GAAGC,QAAQ,CAACC,cAAc,CAAE,uBAAwB,CAAC;IACpE,MAAMC,kBAAkB,GAAGF,QAAQ,CAACC,cAAc,CACjD,sBACD,CAAC;IACD,MAAME,eAAe,GAAGH,QAAQ,CAACC,cAAc,CAAE,mBAAoB,CAAC;IAEtE,IAAKF,SAAS,KAAK,IAAI,EAAG;MACzBN,YAAY,CAAEI,gBAAiB,CAAC;IACjC;IAEA,IAAKK,kBAAkB,KAAK,IAAI,EAAG;MAClCV,YAAY,CAAE,WAAY,CAAC;IAC5B;IAEA,IAAKW,eAAe,KAAK,IAAI,EAAG;MAC/BX,YAAY,CAAE,QAAS,CAAC;IACzB;EACD,CAAC;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASY,KAAKA,CAAEC,OAAO,EAAEC,QAAQ,EAAG;EAC1C;AACD;AACA;AACA;EACCZ,KAAK,CAAC,CAAC;EAEPW,OAAO,GAAGV,aAAa,CAAEU,OAAQ,CAAC;EAElC,MAAMN,SAAS,GAAGC,QAAQ,CAACC,cAAc,CAAE,uBAAwB,CAAC;EACpE,MAAMC,kBAAkB,GAAGF,QAAQ,CAACC,cAAc,CACjD,sBACD,CAAC;EACD,MAAME,eAAe,GAAGH,QAAQ,CAACC,cAAc,CAAE,mBAAoB,CAAC;EAEtE,IAAKC,kBAAkB,IAAII,QAAQ,KAAK,WAAW,EAAG;IACrDJ,kBAAkB,CAACK,WAAW,GAAGF,OAAO;EACzC,CAAC,MAAM,IAAKF,eAAe,EAAG;IAC7BA,eAAe,CAACI,WAAW,GAAGF,OAAO;EACtC;;EAEA;AACD;AACA;AACA;EACC,IAAKN,SAAS,EAAG;IAChBA,SAAS,CAACS,eAAe,CAAE,QAAS,CAAC;EACtC;AACD","ignoreList":[]}
|