Skip to content

Commit

Permalink
fix(aria-allowed-attr): allow meter role allowed aria-* attributes on…
Browse files Browse the repository at this point in the history
… 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).
  • Loading branch information
straker committed May 1, 2024
1 parent eac8223 commit 7ac6392
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/commons/standards/implicit-html-roles.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ const implicitHtmlRoles = {
main: 'main',
math: 'math',
menu: 'list',
meter: 'meter',
nav: 'navigation',
ol: 'list',
optgroup: 'group',
Expand Down
11 changes: 10 additions & 1 deletion test/integration/rules/aria-allowed-attr/passes.html
Original file line number Diff line number Diff line change
Expand Up @@ -2118,7 +2118,16 @@
<dl aria-label="value" id="pass84"></dl>
<input aria-label="value" id="pass85" />
<label aria-label="value" id="pass86"></label>
<meter aria-label="value" id="pass87"></meter>
<meter
id="pass87"
aria-label="value"
aria-valuemin="0"
aria-valuemax="0"
aria-valuenow="40"
aria-valuetext="40%"
>
40
</meter>
<object aria-label="value" id="pass88"></object>
<svg aria-label="value" id="pass89"></svg>
<video aria-label="value" id="pass90" controls></video>
Expand Down

0 comments on commit 7ac6392

Please sign in to comment.