Skip to main content
GoodFirstPicks
DashboardIssuesReposLeaderboard

GoodFirstPicks by Leaveitblank © 2026

CreatorRequest a RepoPrivacy PolicyTerms of Service
Bug: validateDOMNesting needs to be updated for new customisable form widgets | GoodFirstPicks

Bug: validateDOMNesting needs to be updated for new customisable form widgets

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

Why this is a good first issue

The issue involves updating React's DOM validation logic for new HTML/CSS specs, which is partially implemented and not yet standardized.

AI Summary

The issue involves updating React's validateDOMNesting logic to accommodate new customizable form widgets, particularly `<button>` inside `<select>`. This requires changes to React's internal DOM validation rules. The main blocker is incomplete browser support and pending HTML spec updates, making this a medium-difficulty task with some uncertainty.

Issue Description

React version: 19.1.0

Steps To Reproduce

  1. Implement a select box with the new styling API. For example, follow the MDN tutorial, specifically this point.

Link to code example: (Pure html/css reproduction of <button> working inside of <select>): https://codepen.io/web-dot-dev/pen/gbOKyRZ

The current behavior

An error in the console:

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

The expected behavior

No error.

Additional context

  • For now, only Chomium browsers support this: https://caniuse.com/mdn-css_properties_appearance_base-select
  • Some time ago, a similar issue #27572 was opened and resolved, but it only mentioned the <hr/> tag. The reason for supporting that seems to have been different than this issue.
  • While I opened this issue with the primary focus on the <button> element, now also more elements are supported within the <option> element - source. Should I open a separate issue for that, or do we track everything related here?
    • Additionally, the CSS spec mentions that there will be HTML spec changes to all form controls to allow for new styling API - source. That means that possibly in the future, different child elements will be permitted on different form controls.

The spec

Not all relevant specs were updated. While the CSS spec is ready, HTML isn't. Issues and PRs related to this are tracked here.

Loosel

GitHub Labels

Status: Unconfirmed

Want to work on this?

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

Risk Flags

  • spec not finalized
  • browser compatibility
  • potential architectural impact
Loading labels...

Details

Points10 pts
Difficultymedium
Scopesomewhat clear
Skill Matchmaybe
Test Focusedno