Skip to content

feat: better accessibility defaults#3546

Merged
gabrielmfern merged 8 commits into
canaryfrom
feat/accessibility-defaults
May 27, 2026
Merged

feat: better accessibility defaults#3546
gabrielmfern merged 8 commits into
canaryfrom
feat/accessibility-defaults

Conversation

@gabrielmfern
Copy link
Copy Markdown
Member

@gabrielmfern gabrielmfern commented May 27, 2026

pushing to improve in the directions that https://emailmarkup.org/en/reports/accessibility/2026/ has


Summary by cubic

Improve accessibility defaults across react-email components with no breaking changes. Better screen reader behavior, RTL/i18n support, clearer previews, and a changeset to ship a patch release.

  • New Features
    • Body: sets dir="ltr" and lang="en" on and its inner ; props still override.
    • Img: defaults to alt="" when not provided.
    • Markdown: tables render with role="presentation".
    • Preview: injects preview text into a <title> before the hidden preheader.

Written for commit 5ba6f02. Summary will update on new commits. Review in cubic

Signed-off-by: gabriel miranda <gabriel@resend.com>
Signed-off-by: gabriel miranda <gabriel@resend.com>
Signed-off-by: gabriel miranda <gabriel@resend.com>
Signed-off-by: gabriel miranda <gabriel@resend.com>
Signed-off-by: gabriel miranda <gabriel@resend.com>
Signed-off-by: gabriel miranda <gabriel@resend.com>
@gabrielmfern gabrielmfern self-assigned this May 27, 2026
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
react-email Ready Ready Preview, Comment May 27, 2026 2:35pm
react-email-demo Ready Ready Preview, Comment May 27, 2026 2:35pm

Request Review

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 27, 2026

🦋 Changeset detected

Latest commit: 5ba6f02

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
react-email Patch
@react-email/editor Patch
@react-email/ui Patch

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

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 27, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@react-email/editor@3546
npm i https://pkg.pr.new/react-email@3546
npm i https://pkg.pr.new/@react-email/ui@3546

commit: 5ba6f02

Signed-off-by: gabriel miranda <gabriel@resend.com>
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

0 issues found across 1 file (changes from recent commits).

Requires human review: Adding a <title> tag inside the email body rather than the could produce invalid HTML and unexpected behavior in email clients, so this change requires human review to verify its correctness.

Re-trigger cubic

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 4 files

Confidence score: 4/5

  • This PR is likely safe to merge with minimal risk, since the only reported issue is moderate (5/10) and focused on markup validity rather than a clear functional break.
  • In packages/react-email/src/components/preview/preview.tsx, emitting a <title> from Preview can place metadata outside <head>, which may lead to invalid HTML and inconsistent handling by clients.
  • Pay close attention to packages/react-email/src/components/preview/preview.tsx - ensure <title> generation is moved to a proper <head> context or removed from this component.

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread packages/react-email/src/components/preview/preview.tsx
Signed-off-by: gabriel miranda <gabriel@resend.com>
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

0 issues found across 7 files (changes from recent commits).

Auto-approved: The PR introduces low-risk accessibility improvements (default dir/lang on Body, default empty alt on Img, role='presentation' on Markdown tables, and a <title> from Preview). All changes are non-breaking, props override defaults, tests are updated, and the diff is small...

Re-trigger cubic

Comment thread packages/react-email/src/components/img/img.tsx
@gabrielmfern gabrielmfern merged commit d47825a into canary May 27, 2026
19 of 20 checks passed
@gabrielmfern gabrielmfern deleted the feat/accessibility-defaults branch May 27, 2026 14:46
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.

4 participants