-
Notifications
You must be signed in to change notification settings - Fork 402
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: allow any role on
a
elem with no href
Any role is allowed according to ARIA in HTML: https://www.w3.org/TR/html-aria/#anohref Ported from validator/validator#774 Fix #1022
- Loading branch information
Showing
3 changed files
with
52 additions
and
18 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
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
12 changes: 12 additions & 0 deletions
12
src/test/resources/30/single/xhtml/valid/aria-role-a-nohref.xhtml
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<!DOCTYPE html> | ||
<html xmlns="http://www.w3.org/1999/xhtml" lang="en"> | ||
<head> | ||
<title>Test</title> | ||
<meta charset="UTF-8"/> | ||
</head> | ||
<body> | ||
<h1>Test</h1> | ||
<!-- this is allowed by ARIA in HTML, but not a good practice --> | ||
<a role="doc-pagebreak">1</a> | ||
</body> | ||
</html> |