Skip to content

Select has aria-required on the wrong element #46030

@khalibloo

Description

@khalibloo

Reproduction link

Edit on CodeSandbox

Steps to reproduce

  1. Put a Select inside a FormItem
  2. Make FormItem required

What is expected?

aria-required should not be added to a div tag at the root of Select. It should be added to the input among its children.

What is actually happening?

aria-required is being added to a div tag. It is likely that other aria-* attributes passed to Select will also just be added to the root element in the Select, instead of the input element.

Environment Info
antd 5.11.3
React 18.2.0
System Windows 10
Browser Firefox 119

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions