Skip to content

fix: add suppressHydrationWarning to GlobalDOMAttributes and update f… - #10527

Open
miszuto wants to merge 1 commit into
adobe:mainfrom
miszuto:fix/filter-dom-props-suppress-hydration-warning
Open

fix: add suppressHydrationWarning to GlobalDOMAttributes and update f…#10527
miszuto wants to merge 1 commit into
adobe:mainfrom
miszuto:fix/filter-dom-props-suppress-hydration-warning

Conversation

@miszuto

@miszuto miszuto commented Aug 28, 2026

Copy link
Copy Markdown

filterDOMProps did not forward suppressHydrationWarning, even though it is a valid React prop for handling unavoidable server/client hydration differences.

This change adds the prop to GlobalDOMAttributes and to the global attributes handled by filterDOMProps. Components using this utility can now forward it to the DOM only when {global: true} is specified. Unit tests cover both the inclusion and stripping behavior.

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component). Documentation is not applicable to this internal type/utility change.
  • Looked at the Accessibility Practices for this feature - Aria Practices. Not applicable; this does not change component interactions or ARIA behavior.
  • I understand every change in this PR and can explain why it's there.
  • If AI-assisted, I followed the AI contribution guidance and pointed my assistant at CLAUDE.md.

📝 Test Instructions:

Run the filterDOMProps unit tests and verify that:

  • suppressHydrationWarning is retained with {global: true}.
  • It is removed without {global: true}.
  • Existing global-attribute filtering remains unchanged.

AI assistance

I used an AI assistant to help draft the implementation and tests. I reviewed, understand, and take responsibility for every change in this PR.

@miszuto miszuto closed this Aug 28, 2026
@miszuto miszuto reopened this Aug 28, 2026

@snowystinger snowystinger left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the PR, were you running into an issue where SSR wasn't working? Can you provide a reproduction? Ideally, you'd open an Issue first with that information so that a PR doesn't just appear, we have some context for it.

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.

2 participants