Allow aria-label and aria-labelledby attributes on all input components.
[ ] bug report
[X] feature request
[ ] support request
Current behavior
I cannot associate aria-label or aria-labelledby attributes with Dropdown or other PrimeReact input components. (This was noted in issue #729, but that issue was closed without addressing this request.)
Expected behavior
I would expect that I could define a Dropdown and any other PrimeReact input components like this:
<Dropdown value='test' editable={true} options={[]} ariaLabel='Test' />
or
<Dropdown value='test' editable={true} options={[]} ariaLabelledby='testid' />
-
React version: 16.8.6
-
PrimeReact version: 3.1.2
-
Browser: all
-
Language: all
Components;
- [x] InputText
- [x] InputTextarea
- [x] DropDown https://github.com/primefaces/primereact/issues/855
- [ ] Calendar
- [ ] MultiSelect
- [x] InputSwitch should also allow aria attributes (not handled in primereact 3.1.2)
- [x] Checkbox should also allow aria attributes (already have inputId to set <label htmlFor="id"/> but sometimes need to have aria-label different than <label>.
Will you add this support for InputNumber as well? Right now it only has aria-labelledby attribute.
aria-* for accessibility and data-* for testing should be passed through on the root of all components.
@jeffgaynorspok this feature was added in this ticket: https://github.com/primefaces/primereact/issues/2620