From ceef65aa787d8f5be4ca94fef3d5cd9a9f077315 Mon Sep 17 00:00:00 2001 From: Steven Lambert Date: Thu, 23 Mar 2023 14:25:53 -0600 Subject: [PATCH 1/2] fix(aria-allowed-attrs): allow aria-description and aria-braille* attrs --- lib/standards/aria-attrs.js | 13 ++ .../rules/aria-allowed-attr/passes.html | 201 ++++++++++++++++++ 2 files changed, 214 insertions(+) diff --git a/lib/standards/aria-attrs.js b/lib/standards/aria-attrs.js index 85bf547e74..1143ca1fc7 100644 --- a/lib/standards/aria-attrs.js +++ b/lib/standards/aria-attrs.js @@ -12,6 +12,14 @@ const ariaAttrs = { type: 'nmtoken', values: ['inline', 'list', 'both', 'none'] }, + 'aria-braillelabel': { + type: 'string', + global: true + }, + 'aria-brailleroledescription': { + type: 'string', + global: true + }, 'aria-busy': { type: 'boolean', global: true @@ -48,6 +56,11 @@ const ariaAttrs = { allowEmpty: true, global: true }, + 'aria-description': { + type: 'string', + allowEmpty: true, + global: true + }, 'aria-details': { type: 'idref', allowEmpty: true, diff --git a/test/integration/rules/aria-allowed-attr/passes.html b/test/integration/rules/aria-allowed-attr/passes.html index fe562556bc..9bee42b07c 100644 --- a/test/integration/rules/aria-allowed-attr/passes.html +++ b/test/integration/rules/aria-allowed-attr/passes.html @@ -7,9 +7,12 @@ id="pass1" aria-expanded="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -33,9 +36,12 @@ id="pass2" aria-expanded="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -61,9 +67,12 @@ aria-activedescendant="value" aria-expanded="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -89,9 +98,12 @@ aria-posinset="value" aria-setsize="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -115,9 +127,12 @@ id="pass5" aria-expanded="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -142,9 +157,12 @@ aria-expanded="value" aria-pressed="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -168,9 +186,12 @@ id="pass7" aria-checked="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -203,9 +224,12 @@ aria-selected="value" aria-required="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -233,9 +257,12 @@ aria-expanded="value" aria-orientation="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -259,9 +286,12 @@ id="pass10" aria-expanded="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -285,9 +315,12 @@ id="pass11" aria-expanded="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -311,9 +344,12 @@ id="pass12" aria-expanded="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -337,9 +373,12 @@ id="pass13" aria-expanded="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -364,9 +403,12 @@ id="pass14" aria-expanded="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -390,9 +432,12 @@ id="pass15" aria-expanded="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -416,9 +461,12 @@ id="pass16" aria-expanded="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -442,9 +490,12 @@ id="pass17" aria-expanded="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -472,9 +523,12 @@ aria-activedescendant="value" aria-expanded="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -507,9 +561,12 @@ aria-expanded="value" aria-required="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -534,9 +591,12 @@ aria-activedescendant="value" aria-expanded="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -560,9 +620,12 @@ id="pass21" aria-expanded="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -586,9 +649,12 @@ id="pass22" aria-expanded="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -612,9 +678,12 @@ id="pass23" aria-expanded="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -638,9 +707,12 @@ id="pass24" aria-expanded="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -668,9 +740,12 @@ aria-expanded="value" aria-orientation="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -698,9 +773,12 @@ aria-setsize="value" aria-expanded="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -724,9 +802,12 @@ id="pass27" aria-expanded="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -750,9 +831,12 @@ id="pass28" aria-expanded="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -776,9 +860,12 @@ id="pass29" aria-expanded="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -802,9 +889,12 @@ id="pass30" aria-expanded="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -830,9 +920,12 @@ aria-expanded="value" aria-orientation="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -858,9 +951,12 @@ aria-expanded="value" aria-orientation="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -886,9 +982,12 @@ aria-expanded="value" aria-setsize="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -914,9 +1013,12 @@ aria-posinset="value" aria-setsize="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -942,9 +1044,12 @@ aria-setsize="value" aria-checked="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -968,9 +1073,12 @@ id="pass36" aria-expanded="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -994,9 +1102,12 @@ id="pass37" aria-expanded="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -1023,9 +1134,12 @@ aria-setsize="value" aria-checked="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -1052,9 +1166,12 @@ aria-valuemax="value" aria-valuemin="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -1081,9 +1198,12 @@ aria-setsize="value" aria-checked="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -1109,9 +1229,12 @@ aria-required="value" aria-expanded="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -1136,9 +1259,12 @@ id="pass42" aria-expanded="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -1167,9 +1293,12 @@ aria-activedescendant="value" aria-expanded="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -1192,9 +1321,12 @@ role="rowgroup" id="pass44" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -1226,9 +1358,12 @@ aria-expanded="value" aria-selected="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -1257,8 +1392,11 @@ aria-valuemax="value" aria-valuemin="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -1282,9 +1420,12 @@ id="pass47" aria-expanded="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -1308,9 +1449,12 @@ id="pass48" aria-orientation="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -1342,9 +1486,12 @@ aria-valuemax="value" aria-valuemin="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -1373,9 +1520,12 @@ aria-valuemax="value" aria-valuemin="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -1400,9 +1550,12 @@ id="pass51" aria-expanded="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -1429,9 +1582,12 @@ aria-posinset="value" aria-setsize="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -1459,9 +1615,12 @@ aria-multiselectable="value" aria-orientation="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -1485,9 +1644,12 @@ id="pass54" aria-expanded="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -1515,9 +1677,12 @@ aria-readonly="value" aria-required="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -1542,9 +1707,12 @@ id="pass56" aria-expanded="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -1569,9 +1737,12 @@ aria-activedescendant="value" aria-expanded="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -1596,9 +1767,12 @@ id="pass58" aria-expanded="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -1626,9 +1800,12 @@ aria-expanded="value" aria-orientation="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -1660,9 +1837,12 @@ aria-required="value" aria-rowcount="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -1691,9 +1871,12 @@ aria-posinset="value" aria-setsize="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -1717,9 +1900,12 @@ id="pass62" aria-checked="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -1746,9 +1932,12 @@ aria-rowindex="value" aria-rowspan="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -1776,9 +1965,12 @@ aria-readonly="value" aria-required="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -1803,9 +1995,12 @@ id="pass65" aria-expanded="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -1828,9 +2023,12 @@ role="text" id="pass66" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" @@ -1855,9 +2053,12 @@ aria-colcount="value" aria-rowcount="value" aria-atomic="value" + aria-braillelabel="value" + aria-brailleroledescription="value" aria-busy="value" aria-controls="value" aria-describedby="value" + aria-description="value" aria-details="value" aria-disabled="value" aria-dropeffect="value" From b5142824fcf4460389a52aa5ccffb61e4401f6d2 Mon Sep 17 00:00:00 2001 From: Steven Lambert Date: Thu, 23 Mar 2023 14:29:32 -0600 Subject: [PATCH 2/2] fix test --- test/commons/standards/get-global-aria-attrs.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/commons/standards/get-global-aria-attrs.js b/test/commons/standards/get-global-aria-attrs.js index a1bbf28408..0141f255a3 100644 --- a/test/commons/standards/get-global-aria-attrs.js +++ b/test/commons/standards/get-global-aria-attrs.js @@ -14,10 +14,13 @@ describe('standards.getGlobalAriaAttrs', function () { var globalAttrs = getGlobalAriaAttrs(); assert.deepEqual(globalAttrs, [ 'aria-atomic', + 'aria-braillelabel', + 'aria-brailleroledescription', 'aria-busy', 'aria-controls', 'aria-current', 'aria-describedby', + 'aria-description', 'aria-details', 'aria-disabled', 'aria-dropeffect',