-
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: improve checking of missing SVG link labels, now USAGE
This commit changes the severity of error `ACC-011` to USAGE (was WARNING). Labelling links is not strictly a spec requirement, and checking for missing labels should be done with specialized accessibility inspection. The check is still available, with an improved logic: the link is reported as having a missing accessible label only if: - it does not have an `xlink:title` attribute - AND it does not have an `aria-label` attribute - AND it does not have a `title` element child - AND it does not have a `text` element child Note that his logic is incomplete, as it does not check that the content of `title` or `text` children is not empty. But reporting links that have none of the above can be somewhat useful as a simplified first-pass accessibility check. Fix #1353
- Loading branch information
Showing
9 changed files
with
46 additions
and
45 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
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
23 changes: 23 additions & 0 deletions
23
src/test/resources/epub3/06-content-document/files/link-label-valid.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 0 additions & 9 deletions
9
src/test/resources/epub3/06-content-document/files/link-no-title-error.svg
This file was deleted.
Oops, something went wrong.
20 changes: 0 additions & 20 deletions
20
src/test/resources/epub3/06-content-document/files/svg-links-no-title-warning.xhtml
This file was deleted.
Oops, something went wrong.