From 94e9893b5be9fe40c52076af558b17e7a22c6449 Mon Sep 17 00:00:00 2001 From: Steven Lambert Date: Wed, 20 Mar 2019 10:28:00 -0600 Subject: [PATCH] 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 --- lib/commons/aria/index.js | 2 +- .../rules/aria-required-parent/aria-required-parent.html | 3 +++ .../rules/aria-required-parent/aria-required-parent.json | 8 +++++++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/commons/aria/index.js b/lib/commons/aria/index.js index 7389886c22..e8e12b2065 100644 --- a/lib/commons/aria/index.js +++ b/lib/commons/aria/index.js @@ -1653,7 +1653,7 @@ lookupTable.role = { all: ['row'] }, nameFrom: ['author', 'contents'], - context: ['grid', 'table'], + context: ['grid', 'table', 'treegrid'], implicit: ['tbody', 'thead', 'tfoot'], unsupported: false }, diff --git a/test/integration/rules/aria-required-parent/aria-required-parent.html b/test/integration/rules/aria-required-parent/aria-required-parent.html index 09880b22e8..13a933abc7 100644 --- a/test/integration/rules/aria-required-parent/aria-required-parent.html +++ b/test/integration/rules/aria-required-parent/aria-required-parent.html @@ -8,3 +8,6 @@
+
Item 1
+
Item 1
+
Item 1
diff --git a/test/integration/rules/aria-required-parent/aria-required-parent.json b/test/integration/rules/aria-required-parent/aria-required-parent.json index de61dcbfc4..91d50f2cfe 100644 --- a/test/integration/rules/aria-required-parent/aria-required-parent.json +++ b/test/integration/rules/aria-required-parent/aria-required-parent.json @@ -10,6 +10,12 @@ ["#pass5"], ["#pass6"], ["#pass7"], - ["#pass8"] + ["#pass8"], + ["#pass9"], + ["#pass10"], + ["#pass11"], + ["#pass12"], + ["#pass13"], + ["#pass14"] ] }