Skip to content

Commit 94e9893

Browse files
strakerWilcoFiers
authored andcommitted
fix: Add treegrid as allowed parent to rowgroup (#1435)
`rowgroup` is allowed a `treegrid` context according to the [ARIA spec](https://www.w3.org/TR/wai-aria-1.1/#rowgroup). Closes: #1386 ## Reviewer checks **Required fields, to be filled out by PR reviewer(s)** - [x] Follows the commit message policy, appropriate for next version - [x] Has documentation updated, a DU ticket, or requires no documentation change - [x] Includes new tests, or was unnecessary - [x] Code is reviewed for security by: @WilcoFiers
1 parent aace2f3 commit 94e9893

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

lib/commons/aria/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1653,7 +1653,7 @@ lookupTable.role = {
16531653
all: ['row']
16541654
},
16551655
nameFrom: ['author', 'contents'],
1656-
context: ['grid', 'table'],
1656+
context: ['grid', 'table', 'treegrid'],
16571657
implicit: ['tbody', 'thead', 'tfoot'],
16581658
unsupported: false
16591659
},

test/integration/rules/aria-required-parent/aria-required-parent.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@
88
<div role="listitem" id="fail3"></div>
99
<div role="list" id="pass7" aria-owns="parent"></div>
1010
<div id="parent"><div role="listitem" id="pass8"></div></div>
11+
<div role="grid" id="pass9"><div role="rowgroup" id="pass10">Item 1</div></div>
12+
<div role="table" id="pass11"><div role="rowgroup" id="pass12">Item 1</div></div>
13+
<div role="treegrid" id="pass13"><div role="rowgroup" id="pass14">Item 1</div></div>

test/integration/rules/aria-required-parent/aria-required-parent.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@
1010
["#pass5"],
1111
["#pass6"],
1212
["#pass7"],
13-
["#pass8"]
13+
["#pass8"],
14+
["#pass9"],
15+
["#pass10"],
16+
["#pass11"],
17+
["#pass12"],
18+
["#pass13"],
19+
["#pass14"]
1420
]
1521
}

0 commit comments

Comments
 (0)