From 0a4397d0998a3e3035d002e5f724cce4faf0b541 Mon Sep 17 00:00:00 2001 From: Francis Storr Date: Tue, 12 Apr 2022 07:42:17 -0700 Subject: [PATCH] feat(empty-table-headers): rule is now best-practice and fails instead of incompletes (#3427) * Update empty-table-header.json References #3404 * update tests * ignore aira-practices pages that violate empty-table-header * remove impact from rule Co-authored-by: Steven Lambert --- lib/rules/empty-table-header.json | 5 ++--- test/aria-practices/apg.spec.js | 7 +++++-- .../rules/empty-table-header/empty-table-header.html | 6 +++--- .../rules/empty-table-header/empty-table-header.json | 2 +- 4 files changed, 11 insertions(+), 9 deletions(-) diff --git a/lib/rules/empty-table-header.json b/lib/rules/empty-table-header.json index 9edb3cdc18..5989478377 100644 --- a/lib/rules/empty-table-header.json +++ b/lib/rules/empty-table-header.json @@ -1,11 +1,10 @@ { "id": "empty-table-header", "selector": "th, [role=\"rowheader\"], [role=\"columnheader\"]", - "tags": ["wcag131", "cat.aria"], - "reviewOnFail": true, + "tags": ["cat.name-role-value", "best-practice"], "metadata": { "description": "Ensures table headers have discernible text", - "help": "Table header text must not be empty" + "help": "Table header text should not be empty" }, "all": [], "any": ["has-visible-text"], diff --git a/test/aria-practices/apg.spec.js b/test/aria-practices/apg.spec.js index 524568d9d2..a043f8d377 100644 --- a/test/aria-practices/apg.spec.js +++ b/test/aria-practices/apg.spec.js @@ -53,8 +53,11 @@ describe('aria-practices', function() { 'landmark-banner-is-top-level', 'landmark-contentinfo-is-top-level' ], - //https://github.com/w3c/aria-practices/issues/2199 - 'button/button_idl.html': ['aria-allowed-attr'] + // https://github.com/w3c/aria-practices/issues/2199 + 'button/button_idl.html': ['aria-allowed-attr'], + // https://github.com/w3c/aria-practices/issues/2285 + 'checkbox/checkbox.html': ['empty-table-header'], + 'dialog-modal/datepicker-dialog.html': ['empty-table-header'] }; // Not an actual content file diff --git a/test/integration/rules/empty-table-header/empty-table-header.html b/test/integration/rules/empty-table-header/empty-table-header.html index f8ab8feab9..24b7200d88 100644 --- a/test/integration/rules/empty-table-header/empty-table-header.html +++ b/test/integration/rules/empty-table-header/empty-table-header.html @@ -26,13 +26,13 @@ - +
- @@ -40,7 +40,7 @@
+
Not Ok
- diff --git a/test/integration/rules/empty-table-header/empty-table-header.json b/test/integration/rules/empty-table-header/empty-table-header.json index a1c725abc7..e1cbe04b71 100644 --- a/test/integration/rules/empty-table-header/empty-table-header.json +++ b/test/integration/rules/empty-table-header/empty-table-header.json @@ -1,6 +1,6 @@ { "description": "empty-table-header tests", "rule": "empty-table-header", - "incomplete": [["#incomplete1"], ["#incomplete2"], ["#incomplete3"]], + "violations": [["#fail1"], ["#fail2"], ["#fail3"]], "passes": [["#pass1"], ["#pass2"], ["#pass3"]] }
+
Not Ok