@wordpress/a11y 3.33.0 → 3.35.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/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 3.35.0 (2023-06-07)
6
+
7
+ ## 3.34.0 (2023-05-24)
8
+
5
9
  ## 3.33.0 (2023-05-10)
6
10
 
7
11
  ## 3.32.0 (2023-04-26)
@@ -12,8 +12,7 @@ exports.default = addContainer;
12
12
  *
13
13
  * @return {HTMLDivElement} The ARIA live region HTML element.
14
14
  */
15
- function addContainer() {
16
- let ariaLive = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'polite';
15
+ function addContainer(ariaLive = 'polite') {
17
16
  const container = document.createElement('div');
18
17
  container.id = `a11y-speak-${ariaLive}`;
19
18
  container.className = 'a11y-speak-region';
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/a11y/src/add-container.js"],"names":["addContainer","ariaLive","container","document","createElement","id","className","setAttribute","body","appendChild"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASA,YAAT,GAA6C;AAAA,MAAtBC,QAAsB,uEAAX,QAAW;AAC3D,QAAMC,SAAS,GAAGC,QAAQ,CAACC,aAAT,CAAwB,KAAxB,CAAlB;AACAF,EAAAA,SAAS,CAACG,EAAV,GAAgB,cAAcJ,QAAU,EAAxC;AACAC,EAAAA,SAAS,CAACI,SAAV,GAAsB,mBAAtB;AAEAJ,EAAAA,SAAS,CAACK,YAAV,CACC,OADD,EAEC,wBACC,eADD,GAEC,aAFD,GAGC,cAHD,GAIC,aAJD,GAKC,mBALD,GAMC,iCAND,GAOC,gCAPD,GAQC,wBARD,GASC,YATD,GAUC,+BAZF;AAcAL,EAAAA,SAAS,CAACK,YAAV,CAAwB,WAAxB,EAAqCN,QAArC;AACAC,EAAAA,SAAS,CAACK,YAAV,CAAwB,eAAxB,EAAyC,gBAAzC;AACAL,EAAAA,SAAS,CAACK,YAAV,CAAwB,aAAxB,EAAuC,MAAvC;AAEA,QAAM;AAAEC,IAAAA;AAAF,MAAWL,QAAjB;;AACA,MAAKK,IAAL,EAAY;AACXA,IAAAA,IAAI,CAACC,WAAL,CAAkBP,SAAlB;AACA;;AAED,SAAOA,SAAP;AACA","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"]}
1
+ {"version":3,"sources":["@wordpress/a11y/src/add-container.js"],"names":["addContainer","ariaLive","container","document","createElement","id","className","setAttribute","body","appendChild"],"mappings":";;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACe,SAASA,YAAT,CAAuBC,QAAQ,GAAG,QAAlC,EAA6C;AAC3D,QAAMC,SAAS,GAAGC,QAAQ,CAACC,aAAT,CAAwB,KAAxB,CAAlB;AACAF,EAAAA,SAAS,CAACG,EAAV,GAAgB,cAAcJ,QAAU,EAAxC;AACAC,EAAAA,SAAS,CAACI,SAAV,GAAsB,mBAAtB;AAEAJ,EAAAA,SAAS,CAACK,YAAV,CACC,OADD,EAEC,wBACC,eADD,GAEC,aAFD,GAGC,cAHD,GAIC,aAJD,GAKC,mBALD,GAMC,iCAND,GAOC,gCAPD,GAQC,wBARD,GASC,YATD,GAUC,+BAZF;AAcAL,EAAAA,SAAS,CAACK,YAAV,CAAwB,WAAxB,EAAqCN,QAArC;AACAC,EAAAA,SAAS,CAACK,YAAV,CAAwB,eAAxB,EAAyC,gBAAzC;AACAL,EAAAA,SAAS,CAACK,YAAV,CAAwB,aAAxB,EAAuC,MAAvC;AAEA,QAAM;AAAEC,IAAAA;AAAF,MAAWL,QAAjB;;AACA,MAAKK,IAAL,EAAY;AACXA,IAAAA,IAAI,CAACC,WAAL,CAAkBP,SAAlB;AACA;;AAED,SAAOA,SAAP;AACA","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"]}
@@ -5,8 +5,7 @@
5
5
  *
6
6
  * @return {HTMLDivElement} The ARIA live region HTML element.
7
7
  */
8
- export default function addContainer() {
9
- let ariaLive = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'polite';
8
+ export default function addContainer(ariaLive = 'polite') {
10
9
  const container = document.createElement('div');
11
10
  container.id = `a11y-speak-${ariaLive}`;
12
11
  container.className = 'a11y-speak-region';
@@ -1 +1 @@
1
- {"version":3,"sources":["@wordpress/a11y/src/add-container.js"],"names":["addContainer","ariaLive","container","document","createElement","id","className","setAttribute","body","appendChild"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASA,YAAT,GAA6C;AAAA,MAAtBC,QAAsB,uEAAX,QAAW;AAC3D,QAAMC,SAAS,GAAGC,QAAQ,CAACC,aAAT,CAAwB,KAAxB,CAAlB;AACAF,EAAAA,SAAS,CAACG,EAAV,GAAgB,cAAcJ,QAAU,EAAxC;AACAC,EAAAA,SAAS,CAACI,SAAV,GAAsB,mBAAtB;AAEAJ,EAAAA,SAAS,CAACK,YAAV,CACC,OADD,EAEC,wBACC,eADD,GAEC,aAFD,GAGC,cAHD,GAIC,aAJD,GAKC,mBALD,GAMC,iCAND,GAOC,gCAPD,GAQC,wBARD,GASC,YATD,GAUC,+BAZF;AAcAL,EAAAA,SAAS,CAACK,YAAV,CAAwB,WAAxB,EAAqCN,QAArC;AACAC,EAAAA,SAAS,CAACK,YAAV,CAAwB,eAAxB,EAAyC,gBAAzC;AACAL,EAAAA,SAAS,CAACK,YAAV,CAAwB,aAAxB,EAAuC,MAAvC;AAEA,QAAM;AAAEC,IAAAA;AAAF,MAAWL,QAAjB;;AACA,MAAKK,IAAL,EAAY;AACXA,IAAAA,IAAI,CAACC,WAAL,CAAkBP,SAAlB;AACA;;AAED,SAAOA,SAAP;AACA","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"]}
1
+ {"version":3,"sources":["@wordpress/a11y/src/add-container.js"],"names":["addContainer","ariaLive","container","document","createElement","id","className","setAttribute","body","appendChild"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASA,YAAT,CAAuBC,QAAQ,GAAG,QAAlC,EAA6C;AAC3D,QAAMC,SAAS,GAAGC,QAAQ,CAACC,aAAT,CAAwB,KAAxB,CAAlB;AACAF,EAAAA,SAAS,CAACG,EAAV,GAAgB,cAAcJ,QAAU,EAAxC;AACAC,EAAAA,SAAS,CAACI,SAAV,GAAsB,mBAAtB;AAEAJ,EAAAA,SAAS,CAACK,YAAV,CACC,OADD,EAEC,wBACC,eADD,GAEC,aAFD,GAGC,cAHD,GAIC,aAJD,GAKC,mBALD,GAMC,iCAND,GAOC,gCAPD,GAQC,wBARD,GASC,YATD,GAUC,+BAZF;AAcAL,EAAAA,SAAS,CAACK,YAAV,CAAwB,WAAxB,EAAqCN,QAArC;AACAC,EAAAA,SAAS,CAACK,YAAV,CAAwB,eAAxB,EAAyC,gBAAzC;AACAL,EAAAA,SAAS,CAACK,YAAV,CAAwB,aAAxB,EAAuC,MAAvC;AAEA,QAAM;AAAEC,IAAAA;AAAF,MAAWL,QAAjB;;AACA,MAAKK,IAAL,EAAY;AACXA,IAAAA,IAAI,CAACC,WAAL,CAAkBP,SAAlB;AACA;;AAED,SAAOA,SAAP;AACA","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"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wordpress/a11y",
3
- "version": "3.33.0",
3
+ "version": "3.35.0",
4
4
  "description": "Accessibility (a11y) utilities for WordPress.",
5
5
  "author": "The WordPress Contributors",
6
6
  "license": "GPL-2.0-or-later",
@@ -29,11 +29,11 @@
29
29
  "types": "build-types",
30
30
  "dependencies": {
31
31
  "@babel/runtime": "^7.16.0",
32
- "@wordpress/dom-ready": "^3.33.0",
33
- "@wordpress/i18n": "^4.33.0"
32
+ "@wordpress/dom-ready": "^3.35.0",
33
+ "@wordpress/i18n": "^4.35.0"
34
34
  },
35
35
  "publishConfig": {
36
36
  "access": "public"
37
37
  },
38
- "gitHead": "e936127e1e13881f1a940b7bd1593a9e500147f3"
38
+ "gitHead": "a92f606309b1541b834ff9b0a76ed2a466fc45ed"
39
39
  }