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

feat(gatsby-plugin-image): Better error message for missing alt #29981

Merged
merged 4 commits into from
Mar 8, 2021

Conversation

ascorbic
Copy link
Contributor

@ascorbic ascorbic commented Mar 4, 2021

Improve the propTypes error when a user doesn't include an alt prop.

Warning: Failed prop type: The "alt" prop is required for GatsbyImage. If the image is purely presentational then pass an empty string: e.g. alt="". Learn more: https://a11y-style-guide.com/style-guide/section-media.html

@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Mar 4, 2021
@ascorbic ascorbic added topic: a11y Related to accessibility and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Mar 4, 2021
@ascorbic ascorbic requested a review from LekoArts March 4, 2021 11:45
@ascorbic ascorbic force-pushed the feat/better-alt-proptype branch from ec7519d to feec096 Compare March 4, 2021 11:46
Copy link
Contributor

@LekoArts LekoArts left a comment

Choose a reason for hiding this comment

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

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: merge on green Gatsbot will merge these PRs automatically when all tests passes topic: a11y Related to accessibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants