-
Notifications
You must be signed in to change notification settings - Fork 235
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Don't require redundant role for <img alt="" />
Fixes #2951 This updates the `require-valid-alt-text` rule so that it does not *require* setting `role="presentation"` or `role="none"` for an `<img alt="" />`. Context After bumping `aria-query` in #2927, `ember-template-lint` began reporting an error for the following: ```html <img alt="" role="presentation" /> ``` The error is from the `no-redundant-role`. I believe it is correct to report an error in this case because `<img alt="" />` already implicitly has a `role` of `presentation`. However, this new behavior was in direct conflict with part of the `require-valid-alt-text` rule that required setting `role="presentation"` or `role="none"` whenever an image has `alt=""`.
- Loading branch information
1 parent
6a725f2
commit f269000
Showing
2 changed files
with
7 additions
and
54 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