Skip to content
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

IgnoreAltEmpty option for alt="" decorative images #200

Merged
merged 1 commit into from
Nov 4, 2022

Conversation

jhunt
Copy link
Contributor

@jhunt jhunt commented Nov 3, 2022

Introduces a new configuration option, IgnoreAltEmpty for allowing alt attribute checks against images, while being more lenient with explicit empty alt attributes. WAI instructs HTML practitioners to set an explicitly empty alt attribute for decorative images that offer no additional context or meaningful information to a page, so that they can be skipped by screen readers:

https://www.w3.org/WAI/tutorials/images/decorative/

Fixes #153

I have been using this on my own fork to validate https://vivanti.com/

Introduces a new configuration option, `IgnoreAltEmpty` for allowing alt
attribute checks against images, while being more lenient with explicit
empty alt attributes.  WAI instructs HTML practitioners to set an
explicitly empty alt attribute for decorative images that offer no
additional context or meaningful information to a page, so that they can
be skipped by screen readers:

https://www.w3.org/WAI/tutorials/images/decorative/

Fixes wjdp#153
Copy link
Owner

@wjdp wjdp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! Thanks for this @jhunt

@wjdp wjdp merged commit ec73feb into wjdp:master Nov 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

empty alt may be OK in some situations
2 participants