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

Add description prop to ImageCard to allow for descriptive alt text #1487

Closed
akegan opened this issue Jul 7, 2021 · 2 comments
Closed

Add description prop to ImageCard to allow for descriptive alt text #1487

akegan opened this issue Jul 7, 2021 · 2 comments
Labels
a11y An accessibility bug

Comments

@akegan
Copy link
Contributor

akegan commented Jul 7, 2021

While addressing #142 with #1450, axe found an issue where on ImageCard we were passing the title as the alt text for the image. It was flagged because the recommended best practice is to not repeat image alt text as text on the page. There's more info about this rule on the Deque website.

As a temporary fix, we added the alt text of "A picture of the building" to the alt text, but we'd like to follow up to allow for a description prop to be passed as alt text because the image card could in theory be used in different contexts. If the description prop is not available, we want to default to empty alt text to avoid having the title read out twice.

@akegan akegan added the a11y An accessibility bug label Jul 7, 2021
@seanmalbert
Copy link
Collaborator

seanmalbert commented Jul 19, 2021

This was actually done with #1450 and can be reviewed at https://dev-storybook-bloom.netlify.app/?path=/story/blocks-image-card--with-description-as-alt

@akegan
Copy link
Contributor Author

akegan commented Jul 20, 2021

OK then I'll close that out

@akegan akegan closed this as completed Jul 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a11y An accessibility bug
Projects
None yet
Development

No branches or pull requests

2 participants