From e839c5772414655684b6cea4d05a1c01ee98a303 Mon Sep 17 00:00:00 2001 From: Wilco Fiers Date: Wed, 4 Dec 2019 12:55:29 +0100 Subject: [PATCH] fix(link-name): test role=link when there is no href (#1921) --- lib/rules/link-name.json | 9 +++++---- lib/rules/role-not-button-matches.js | 1 - 2 files changed, 5 insertions(+), 5 deletions(-) delete mode 100644 lib/rules/role-not-button-matches.js diff --git a/lib/rules/link-name.json b/lib/rules/link-name.json index 1664b47c66..f5f9f592d2 100644 --- a/lib/rules/link-name.json +++ b/lib/rules/link-name.json @@ -1,7 +1,6 @@ { "id": "link-name", - "selector": "a[href], [role=link][href]", - "matches": "role-not-button-matches.js", + "selector": "a[href]:not([role=button]), [role=link]", "tags": [ "cat.name-role-value", "wcag2a", @@ -22,5 +21,7 @@ "role-presentation", "role-none" ], - "none": ["focusable-no-name"] -} + "none": [ + "focusable-no-name" + ] +} \ No newline at end of file diff --git a/lib/rules/role-not-button-matches.js b/lib/rules/role-not-button-matches.js deleted file mode 100644 index 41fe6fc535..0000000000 --- a/lib/rules/role-not-button-matches.js +++ /dev/null @@ -1 +0,0 @@ -return node.getAttribute('role') !== 'button';