Skip to main content
GoodFirstPicks
DashboardIssuesReposLeaderboard

GoodFirstPicks by Leaveitblank © 2026

CreatorRequest a RepoPrivacy PolicyTerms of Service
Bug: New Customizable Select: option containing span, Select containing button causes hydration warning | GoodFirstPicks

Bug: New Customizable Select: option containing span, Select containing button causes hydration warning

facebook/react 15 comments 1mo ago
View on GitHub
mediumopenScope: somewhat clearSkill match: maybeReactJavaScriptTypeScript

Why this is a good first issue

React's DOM validation needs updating for new customizable select elements.

AI Summary

The issue reports hydration warnings when using new customizable select elements with spans in options or buttons in selects. React's DOM validation needs updating to recognize these valid HTML patterns. The challenge is ensuring this change doesn't break existing validation logic.

Issue Description

Customizable select elements have received support in Chromium 134: https://developer.chrome.com/blog/a-customizable-select https://developer.mozilla.org/en-US/docs/Learn_web_development/Extensions/Forms/Customizable_select

Creating selects with appearance base-select work fine in React, however an error is logged in dev mode in validating DOM nesting.

In HTML, <span> cannot be a child of <option>.
This will cause a hydration error.

and

In HTML, <button> cannot be a child of <select>.
This will cause a hydration error.

React version: 19.1.0

Steps To Reproduce

  1. Copy the example from MDN into a react project, or use my code sandbox
  2. Open dev tools
  3. Observe the warning

Link to code example: https://codesandbox.io/p/sandbox/quiet-cdn-ylm323?file=%2Fsrc%2FApp.js%3A9%2C59

The current behavior

A hydration warning is logged

The expected behavior

No error logged, no hydration errors should be happening (?)

GitHub Labels

Status: Unconfirmed

Want to work on this?

Claim this issue to let others know you're working on it. You'll earn 20 points when you complete it!

Risk Flags

  • hydration warnings
  • DOM validation
Loading labels...

Details

Points20 pts
Difficultymedium
Scopesomewhat clear
Skill Matchmaybe
Test Focusedno