Web Inspector: testCellRoleForRequiredChidren accessibility audit checks for rows...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 24 Mar 2019 20:21:57 +0000 (20:21 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 24 Mar 2019 20:21:57 +0000 (20:21 +0000)
https://bugs.webkit.org/show_bug.cgi?id=195988

Patch by Simon Welsh <simon@welsh-au.com> on 2019-03-24
Reviewed by Timothy Hatcher.

The audit now checks that rows contain cells, allowing any of the four
cell-based roles.

* UserInterface/Controllers/AuditManager.js:
(WI.AuditManager.prototype.addDefaultTestsIfNeeded):
(WI.AuditManager):
(WI.AuditManager.prototype.addDefaultTestsIfNeeded.const.testCellRoleForRequiredChidren): Deleted.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@243425 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Controllers/AuditManager.js

index 522cca3..7b58702 100644 (file)
@@ -1,3 +1,18 @@
+2019-03-24  Simon Welsh  <simon@welsh-au.com>
+
+        Web Inspector: testCellRoleForRequiredChidren accessibility audit checks for rows in cells
+        https://bugs.webkit.org/show_bug.cgi?id=195988
+
+        Reviewed by Timothy Hatcher.
+
+        The audit now checks that rows contain cells, allowing any of the four
+        cell-based roles.
+
+        * UserInterface/Controllers/AuditManager.js:
+        (WI.AuditManager.prototype.addDefaultTestsIfNeeded):
+        (WI.AuditManager):
+        (WI.AuditManager.prototype.addDefaultTestsIfNeeded.const.testCellRoleForRequiredChidren): Deleted.
+
 2019-03-24  Devin Rousso  <drousso@apple.com>
 
         Web Inspector: Canvas: missing icons for WebGL2 contexts
index f1eba1a..c208122 100644 (file)
@@ -732,9 +732,9 @@ WI.AuditManager = class AuditManager extends WI.Object
             return {level: domNodes.length ? "fail" : "pass", domNodes, domAttributes: ["aria-label", "aria-labelledby", "title"]};
         };
 
-        const testCellRoleForRequiredChidren = function() {
+        const testRowRoleForRequiredChidren = function() {
             const relationships = {
-                cell: ["row"],
+                row: ["cell", "gridcell", "columnheader", "rowheader"],
             };
             let domNodes = [];
             let visitedParents = new Set;
@@ -901,7 +901,7 @@ WI.AuditManager = class AuditManager extends WI.Object
                 new WI.AuditTestCase(`testFeedRoleForRequiredChidren`, testFeedRoleForRequiredChidren.toString(), {description: WI.UIString("Ensure that elements of role \u0022%s\u0022 have required owned elements in accordance with WAI-ARIA.").format(WI.unlocalizedString("feed")), supports: 1}),
                 new WI.AuditTestCase(`testTabListRoleForRequiredChidren`, testTabListRoleForRequiredChidren.toString(), {description: WI.UIString("Ensure that element of role \u0022%s\u0022 have required owned elements in accordance with WAI-ARIA.").format(WI.unlocalizedString("tablist")), supports: 1}),
                 new WI.AuditTestCase(`testButtonLabels`, testButtonLabels.toString(), {description: WI.UIString("Ensure that buttons have accessible labels for assistive technology."), supports: 1}),
-                new WI.AuditTestCase(`testCellRoleForRequiredChidren`, testCellRoleForRequiredChidren.toString(), {description: WI.UIString("Ensure that elements of role \u0022%s\u0022 have required owned elements in accordance with WAI-ARIA.").format(WI.unlocalizedString("cell")), supports: 1}),
+                new WI.AuditTestCase(`testRowRoleForRequiredChidren`, testRowRoleForRequiredChidren.toString(), {description: WI.UIString("Ensure that elements of role \u0022%s\u0022 have required owned elements in accordance with WAI-ARIA.").format(WI.unlocalizedString("row")), supports: 1}),
                 new WI.AuditTestCase(`testListRoleForRequiredChidren`, testListRoleForRequiredChidren.toString(), {description: WI.UIString("Ensure that elements of role \u0022%s\u0022 have required owned elements in accordance with WAI-ARIA.").format(WI.unlocalizedString("list")), supports: 1}),
                 new WI.AuditTestCase(`testComboBoxRoleForRequiredChidren`, testComboBoxRoleForRequiredChidren.toString(), {description: WI.UIString("Ensure that elements of role \u0022%s\u0022 have required owned elements in accordance with WAI-ARIA.").format(WI.unlocalizedString("combobox")), supports: 1}),
                 new WI.AuditTestCase(`testForMultipleMainContentSections`, testForMultipleMainContentSections.toString(), {description: WI.UIString("Ensure that only one main content section is used on the page."), supports: 1}),