Skip to content

Adding support for aria-label by default #5981

@Jasen-Simedru-SHG

Description

@Jasen-Simedru-SHG

Sometimes, I want to use the aria-label instead of the aria-labelledby prop because aria-label can be used for cases when you don't want to have a visible label element on the page, but still readable for screen readers for accessibility. aria-labelledby can only be used for cases where you have a label on the page.
However, it's frustrating that in order to use the basic aria-label accessibility prop, you need to pass in a customInput prop with the aria-label defined on the input directly.

It would be nice if DatePicker accepted an optional string prop called ariaLabel that would be passed to the input element by default, similar to how the already existing ariaLabelledBy prop does.

Passing in customInput works, but it should be a bit more straightforward for a basic prop like ariaLabel,

Thanks for your consideration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions