Skip to content

Bug: hidden attribute does not accept string values #24740

@jantimon

Description

@jantimon

React version:

 "react": "18.3.0-next-522f47345-20220614",
 "react-dom": "18.3.0-next-522f47345-20220614",

Steps To Reproduce

<span hidden="until-found">Hello React<span>

Link to code example:

https://codesandbox.io/s/headless-violet-ygn593

The current behavior

React will turn hidden into a boolean attribute and removes "until-found":

preview of the dom after react-dom rendered until-found

The expected behavior

React does not strip "until-found" to allow using hidden-until-found in Chrome 102+ for better SEO and accessibility.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions