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

[a11y] Better image alt text support #1940

Merged
merged 2 commits into from
Sep 22, 2020

Conversation

tvdeyen
Copy link
Member

@tvdeyen tvdeyen commented Sep 22, 2020

What is this pull request for?

Instead of only using the alt_tag attribute of the essence picture this now supports passing the alt attribute via the html_options and adds a fallback to a humanized picture name.

This ensures we alwaus have an alt text for accessibility reasons.

Checklist

  • I have followed Pull Request guidelines
  • I have added a detailed description into each commit message
  • I have added tests to cover this change

Instead of only using the alt_tag attribute of the essence picture this now supports passing the alt attribute via the html_options and adds a fallback to a humanized picture name.

This ensures we always have an alt text for accessibility reasons.
@tvdeyen tvdeyen force-pushed the image-alt-text-fallback branch from ad60e36 to 6d9cd1e Compare September 22, 2020 13:48
Copy link

@dividedharmony dividedharmony left a comment

Choose a reason for hiding this comment

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

I think falling back to the picture's file name is a good last resort 👍

@tvdeyen tvdeyen merged commit 0dd3571 into AlchemyCMS:master Sep 22, 2020
@tvdeyen tvdeyen deleted the image-alt-text-fallback branch September 22, 2020 15:00
tvdeyen added a commit that referenced this pull request Sep 29, 2020
Instead of only using the alt_tag attribute of the essence picture 
this now supports passing the alt attribute via the html_options 
and adds a fallback to a humanized picture name.

This ensures we always have an alt text for accessibility reasons.
@tvdeyen tvdeyen restored the image-alt-text-fallback branch November 24, 2020 08:02
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.

2 participants