fix[image]: ENG-13637 render empty alt attributes when alt text is not provided - #4818
fix[image]: ENG-13637 render empty alt attributes when alt text is not provided#4818floating-dynamo wants to merge 1 commit into
Conversation
🦋 Changeset detectedLatest commit: 9e06dac The changes in this PR will be included in the next version bump. This PR includes changesets to release 8 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
View your CI Pipeline Execution ↗ for commit 9e06dac
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗ ☁️ Nx Cloud last updated this comment at |
There was a problem hiding this comment.
Builder reviewed your changes — looks good ✅
Review Details
Code Review Summary
PR #4818 updates the Gen 1 React Image component and the SDK/Gen 2 lite Image component to emit an explicit empty alt attribute when no alt text is provided, while preserving supplied alt text. The implementation is small and consistent across the two HTML renderers, and the existing presentation behavior for decorative images remains aligned with the empty-alt case.
This is a standard-risk accessibility/UI behavior change. The added unit, snapshot, and SDK end-to-end coverage exercises both missing and populated alt text, and the React Native E2E case is appropriately skipped because it does not render HTML image attributes. Two independent reviews found no confirmed bugs, security concerns, or performance regressions.
🧪 Browser testing: Will run after this review (PR touches UI code)
Description
alt=""for Gen 1 and Gen 2 Image components when alt text is not provided, while preserving populated alt text.Link to JIRA ticket (if applicable):
https://builder-io.atlassian.net/browse/ENG-13637
Screenshot/Clip

Chrome DevTools displays the empty attribute as
alt, which is valid HTML and equivalent toalt="". The DOM confirms that the attribute exists with an empty-string value - Reference