From 16682fdb4aefa1bb0b181235fb4b9f23bd51c99c Mon Sep 17 00:00:00 2001 From: Steven Lambert Date: Tue, 20 Aug 2019 09:17:54 -0600 Subject: [PATCH] feat(rule): aria-roledescription (#1745) * feat(rule): aria-roledescription * change supportedRoles to options * update meta and tests --- doc/aria-supported.md | 11 +-- doc/rule-descriptions.md | 1 + lib/checks/aria/aria-roledescription.js | 14 ++++ lib/checks/aria/aria-roledescription.json | 23 +++++ lib/commons/aria/index.js | 15 +--- lib/rules/aria-roledescription.json | 12 +++ test/checks/aria/aria-roledescription.js | 83 +++++++++++++++++++ .../rules/aria-allowed-attr/failures.html | 6 -- .../rules/aria-allowed-attr/failures.json | 6 +- .../aria-roledescription.html | 29 +++++++ .../aria-roledescription.json | 17 ++++ 11 files changed, 185 insertions(+), 32 deletions(-) create mode 100644 lib/checks/aria/aria-roledescription.js create mode 100644 lib/checks/aria/aria-roledescription.json create mode 100644 lib/rules/aria-roledescription.json create mode 100644 test/checks/aria/aria-roledescription.js create mode 100644 test/integration/rules/aria-roledescription/aria-roledescription.html create mode 100644 test/integration/rules/aria-roledescription/aria-roledescription.json diff --git a/doc/aria-supported.md b/doc/aria-supported.md index e4db5f1814..7698a5d233 100644 --- a/doc/aria-supported.md +++ b/doc/aria-supported.md @@ -8,10 +8,7 @@ For a detailed description about how accessibility support is decided, see [How ## Attributes -| aria-attribute | axe-core support | -| -------------------- | ---------------- | -| aria-describedat | No | -| aria-details | No | -| aria-roledescription | Mixed[^1] | - -[^1]: Supported on elements: ` + + + +
+
+
+ + + +

heading

+
+ +

paragraph

+
div
+ +
diff --git a/test/integration/rules/aria-roledescription/aria-roledescription.json b/test/integration/rules/aria-roledescription/aria-roledescription.json new file mode 100644 index 0000000000..689c383e3a --- /dev/null +++ b/test/integration/rules/aria-roledescription/aria-roledescription.json @@ -0,0 +1,17 @@ +{ + "description": "aria-roledescription test", + "rule": "aria-roledescription", + "violations": [["#fail1"], ["#fail2"], ["#fail3"], ["#fail4"]], + "passes": [ + ["#pass1"], + ["#pass2"], + ["#pass3"], + ["#pass4"], + ["#pass5"], + ["#pass6"], + ["#pass7"], + ["#pass8"], + ["#pass9"] + ], + "incomplete": [["#incomplete1"], ["#incomplete2"]] +}