Skip to content

Commit

Permalink
fix(aria-allowed-attr): allow aria-posinset and aria-setsize on row e…
Browse files Browse the repository at this point in the history
…lements for treegrids (#2952)

* allow posinset and setsize on row elements

* remove update from lookup table

Co-authored-by: Wilco Fiers <WilcoFiers@users.noreply.github.com>

Co-authored-by: Wilco Fiers <WilcoFiers@users.noreply.github.com>
  • Loading branch information
2 people authored and straker committed Jun 3, 2021
1 parent f892cf3 commit 3023e69
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 3 deletions.
4 changes: 3 additions & 1 deletion lib/standards/aria-roles.js
Expand Up @@ -508,7 +508,9 @@ const ariaRoles = {
'aria-rowindex',
'aria-selected',
'aria-activedescendant',
'aria-expanded'
'aria-expanded',
'aria-posinset',
'aria-setsize'
],
superclassRole: ['group', 'widget'],
nameFromContent: true
Expand Down
24 changes: 23 additions & 1 deletion test/integration/rules/aria-allowed-attr/passes.html
Expand Up @@ -1913,9 +1913,31 @@
<iframe aria-label="value" id="pass82" src="/test/playground.html"></iframe>
<canvas aria-label="value" id="pass83"></canvas>
<dl aria-label="value" id="pass84"></dl>
<input aria-label="value" id="pass85"/>
<input aria-label="value" id="pass85" />
<label aria-label="value" id="pass86"></label>
<meter aria-label="value" id="pass87"></meter>
<object aria-label="value" id="pass88"></object>
<svg aria-label="value" id="pass89"></svg>
<video aria-label="value" id="pass90" controls></video>

<table role="treegrid">
<thead>
<tr>
<th>Col 1</th>
</tr>
</thead>
<tbody>
<tr
id="treegrid"
role="row"
aria-level="1"
aria-posinset="1"
aria-setsize="1"
aria-expanded="true"
>
<td role="gridcell">
Treegrids are awesome
</td>
</tr>
</tbody>
</table>
3 changes: 2 additions & 1 deletion test/integration/rules/aria-allowed-attr/passes.json
Expand Up @@ -92,6 +92,7 @@
["#pass87"],
["#pass88"],
["#pass89"],
["#pass90"]
["#pass90"],
["#treegrid"]
]
}

0 comments on commit 3023e69

Please sign in to comment.