From d11aed8a04968674ff872cf832cea9252023490e Mon Sep 17 00:00:00 2001 From: Steven Lambert <2433219+straker@users.noreply.github.com> Date: Fri, 4 Nov 2022 08:05:55 -0600 Subject: [PATCH] fix(aria-required-children): allow menu and menubar to be empty (#3770) --- lib/checks/aria/aria-required-children.json | 2 ++ test/checks/aria/required-children.js | 2 +- .../aria-required-children.html | 24 +++++++++---------- .../aria-required-children.json | 8 +++---- 4 files changed, 19 insertions(+), 17 deletions(-) diff --git a/lib/checks/aria/aria-required-children.json b/lib/checks/aria/aria-required-children.json index 7f89cbeca6..38618dbc19 100644 --- a/lib/checks/aria/aria-required-children.json +++ b/lib/checks/aria/aria-required-children.json @@ -8,6 +8,8 @@ "grid", "list", "listbox", + "menu", + "menubar", "table", "tablist", "tree", diff --git a/test/checks/aria/required-children.js b/test/checks/aria/required-children.js index 126426370d..bde67cf773 100644 --- a/test/checks/aria/required-children.js +++ b/test/checks/aria/required-children.js @@ -426,7 +426,7 @@ describe('aria-required-children', function () { }); it('should not throw when options is incorrect', function () { - var params = checkSetup(''); + var params = checkSetup('
'); // Options: (incorrect) params[1] = ['menu']; diff --git a/test/integration/rules/aria-required-children/aria-required-children.html b/test/integration/rules/aria-required-children/aria-required-children.html index 565cfce232..c6599f50f6 100644 --- a/test/integration/rules/aria-required-children/aria-required-children.html +++ b/test/integration/rules/aria-required-children/aria-required-children.html @@ -7,9 +7,7 @@
- - -
+
@@ -26,13 +24,15 @@
-
+ + +
List item 1
-
+
Item 1
@@ -59,7 +59,7 @@ option
-
+
@@ -82,28 +82,28 @@
item 2
-
+
-
-
+
+
  • Item 1
  • Item 2
    -
    +
    List item 1
    List item 2
    -
    +
    List item 1
    List item 2
    -
    +
    diff --git a/test/integration/rules/aria-required-children/aria-required-children.json b/test/integration/rules/aria-required-children/aria-required-children.json index 6af207cf7e..430f880cad 100644 --- a/test/integration/rules/aria-required-children/aria-required-children.json +++ b/test/integration/rules/aria-required-children/aria-required-children.json @@ -13,9 +13,7 @@ ["#fail9"], ["#fail10"], ["#fail11"], - ["#fail12"], - ["#fail13"], - ["#fail14"] + ["#fail12"] ], "passes": [ ["#pass1"], @@ -42,6 +40,8 @@ ["#incomplete6"], ["#incomplete7"], ["#incomplete8"], - ["#incomplete9"] + ["#incomplete9"], + ["#incomplete10"], + ["#incomplete11"] ] }