fix: Address #8579 Don't display double alt text.#8671
Merged
DSchau merged 1 commit intogatsbyjs:masterfrom Oct 1, 2018
Merged
fix: Address #8579 Don't display double alt text.#8671DSchau merged 1 commit intogatsbyjs:masterfrom
DSchau merged 1 commit intogatsbyjs:masterfrom
Conversation
DSchau
reviewed
Oct 1, 2018
Contributor
DSchau
left a comment
There was a problem hiding this comment.
This looks great, and I'm all for accessibility improvements!
If the snapshots need updated, the best way is to run yarn test:update or npm run test:update, so we'll see if that's needed!
| } else { | ||
| bgColor = backgroundColor | ||
| } | ||
| const bgColor = typeof backgroundColor === `boolean` ? `lightgray` : backgroundColor |
Contributor
|
Waiting to see how the tests fare, but presuming they pass, I'll get this merged and released; thanks! |
Contributor
|
🎉 Successfully published:
- gatsby-image@2.0.13 |
raffishquartan
pushed a commit
to raffishquartan/gatsby
that referenced
this pull request
Apr 28, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
This closes #8579, it attempts to prevent double images from appearing on screen readers.
The main change is that when the real image
isVisible, then the alt text for the placeholder images is set to empty string which will hide the placeholder element from screen readers.Testing
I did not update any of the existing tests, if someone has an idea on how to update please let me know.