-
Notifications
You must be signed in to change notification settings - Fork 781
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add tests for aria-empty-table-header rule
- Loading branch information
Showing
4 changed files
with
26 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
{ | ||
"id": "aria-empty-table-header", | ||
"selector": "th, [role=\"rowheader\"], [role=\"columnheader\"]", | ||
"matches": "heading-matches", | ||
"tags": ["wcag131"], | ||
"metadata": { | ||
"description": "Ensures table headers have discernible text", | ||
"help": "Table header text must not be empty" | ||
}, | ||
"all": ["has-accessible-text"], | ||
"any": [], | ||
"all": [], | ||
"any": ["has-accessible-text"], | ||
"none": [] | ||
} |
22 changes: 21 additions & 1 deletion
22
test/integration/rules/aria-empty-table-header/aria-empty-table-header.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,21 @@ | ||
<!-- HTML Snippets--> | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<title>empty-table-header test</title> | ||
<meta charset="utf8" /> | ||
<script src="/axe.js"></script> | ||
</head> | ||
|
||
<body> | ||
<th id="pass1">Ok</th> | ||
<td id="pass2" role="rowheader">rowheader with name</td> | ||
<td id="pass3" role="columnheader">columnheader with name</td> | ||
<th id="fail1"></th> | ||
<td id="fail2" role="rowheader"> | ||
<div style="display: none">Not Ok</div> | ||
</td> | ||
<td id="fail3" role="columnheader"> | ||
<div style="display: none">Not Ok</div> | ||
</td> | ||
</body> | ||
</html> |
4 changes: 2 additions & 2 deletions
4
test/integration/rules/aria-empty-table-header/aria-empty-table-header.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"description": "aria-empty-table-header tests", | ||
"rule": "aria-empty-table-header", | ||
"violations": [], | ||
"passes": [] | ||
"violations": [["fail1"], ["fail2"], ["fail3"]], | ||
"passes": [["#pass1"], ["#pass2"], ["#pass3"]] | ||
} |
This file was deleted.
Oops, something went wrong.