File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
test/linters/accessibility Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,14 @@ def test_does_not_warn_if_link_does_not_have_aria_hidden
1414 assert_empty @linter . offenses
1515 end
1616
17+ def test_does_not_consider_aria_hidden_as_aria_hidden_true
18+ # aria-hidden is not the same as aria-hidden="true". Not ideal code.
19+ @file = "<a aria-hidden href='github.com'>GitHub</a>"
20+ @linter . run ( processed_source )
21+
22+ assert_empty @linter . offenses
23+ end
24+
1725 def test_does_not_warn_if_link_has_aria_hidden_false
1826 @file = "<a aria-hidden='false' href='github.com'>GitHub</a>"
1927 @linter . run ( processed_source )
@@ -29,7 +37,7 @@ def test_does_not_warn_when_link_has_aria_hidden_true_and_is_not_focusable
2937 end
3038
3139 def test_warns_when_element_has_aria_hidden_true_and_not_tab_focusable
32- @file = "<div role='button' tabindex='0' a aria-hidden='true'>GitHub</a>"
40+ @file = "<div role='button' tabindex='0' aria-hidden='true'>GitHub</a>"
3341 @linter . run ( processed_source )
3442 refute_empty @linter . offenses
3543 end
You can’t perform that action at this time.
0 commit comments