-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Description
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.