-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
a11y checks #815
Merged
Merged
a11y checks #815
Changes from 1 commit
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
51c2e05
a11y checks (#374)
Rich-Harris bacbaef
anchor-has-content
Rich-Harris 6133976
anchor-is-valid
Rich-Harris a90e072
alt-text
Rich-Harris 073cbc0
update some tests
Rich-Harris 125191a
aria-props
Rich-Harris c62a74e
aria-role
Rich-Harris 2364f6a
heading-has-content
Rich-Harris d5b8d2f
no-access-key
Rich-Harris 81c5a1f
no-autofocus
Rich-Harris b3409ad
no-distracting-elements
Rich-Harris 915c183
scope
Rich-Harris 85e9ed9
tabindex-no-positive
Rich-Harris 7c6ea13
reenable all tests, fix some failures
Rich-Harris File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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
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 @@ | ||
<a>not actually a link</a> |
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,8 @@ | ||
[{ | ||
"message": "A11y: <a> element should have an href attribute", | ||
"loc": { | ||
"line": 1, | ||
"column": 0 | ||
}, | ||
"pos": 0 | ||
}] |
19 changes: 19 additions & 0 deletions
19
test/validator/samples/a11y-figcaption-wrong-place/input.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 |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<figure> | ||
<img src='foo.jpg' alt='a picture of a foo'> | ||
|
||
<figcaption> | ||
a foo in its natural habitat | ||
</figcaption> | ||
|
||
<p>this should not be here</p> | ||
</figure> | ||
|
||
<figure> | ||
<img src='foo.jpg' alt='a picture of a foo'> | ||
|
||
<div class='markup-for-styling'> | ||
<figcaption> | ||
this element should be a child of the figure | ||
</figcaption> | ||
</div> | ||
</figure> |
18 changes: 18 additions & 0 deletions
18
test/validator/samples/a11y-figcaption-wrong-place/warnings.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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
[ | ||
{ | ||
"message": "A11y: <figcaption> must be first or last child of <figure>", | ||
"loc": { | ||
"line": 4, | ||
"column": 1 | ||
}, | ||
"pos": 57 | ||
}, | ||
{ | ||
"message": "A11y: <figcaption> must be an immediate child of <figure>", | ||
"loc": { | ||
"line": 15, | ||
"column": 2 | ||
}, | ||
"pos": 252 | ||
} | ||
] |
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 @@ | ||
<img src='foo.jpg'> |
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,8 @@ | ||
[{ | ||
"message": "A11y: <img> element should have an alt attribute", | ||
"loc": { | ||
"line": 1, | ||
"column": 0 | ||
}, | ||
"pos": 0 | ||
}] |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have an only here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, forgot to remove it before pushing — it's just to make my life easier while I'm working on it (as I don't need to configure tests to run individually, or wait for the entire suite). will make sure I remove it before removing the WIP 😀