Skip to content

Commit 7ac6392

Browse files
authoredMay 1, 2024
fix(aria-allowed-attr): allow meter role allowed aria-* attributes on meter element (#4435)
Turns out we didn't list the `meter` element's implicit role. Ref: w3c/html-aria#517 QA notes: verify a `meter` element allows non-global aria attributes from the [`meter` role](https://www.w3.org/TR/wai-aria-1.2/#meter).
1 parent eac8223 commit 7ac6392

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed
 

‎lib/commons/standards/implicit-html-roles.js

+1
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ const implicitHtmlRoles = {
151151
main: 'main',
152152
math: 'math',
153153
menu: 'list',
154+
meter: 'meter',
154155
nav: 'navigation',
155156
ol: 'list',
156157
optgroup: 'group',

‎test/integration/rules/aria-allowed-attr/passes.html

+10-1
Original file line numberDiff line numberDiff line change
@@ -2118,7 +2118,16 @@
21182118
<dl aria-label="value" id="pass84"></dl>
21192119
<input aria-label="value" id="pass85" />
21202120
<label aria-label="value" id="pass86"></label>
2121-
<meter aria-label="value" id="pass87"></meter>
2121+
<meter
2122+
id="pass87"
2123+
aria-label="value"
2124+
aria-valuemin="0"
2125+
aria-valuemax="0"
2126+
aria-valuenow="40"
2127+
aria-valuetext="40%"
2128+
>
2129+
40
2130+
</meter>
21222131
<object aria-label="value" id="pass88"></object>
21232132
<svg aria-label="value" id="pass89"></svg>
21242133
<video aria-label="value" id="pass90" controls></video>

0 commit comments

Comments
 (0)
Failed to load comments.