primereact icon indicating copy to clipboard operation
primereact copied to clipboard

Allow aria-label and aria-labelledby attributes on all input components.

Open efc opened this issue 6 years ago • 5 comments

[ ] 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

efc avatar Apr 07 '19 04:04 efc

Components;

  • [x] InputText
  • [x] InputTextarea
  • [x] DropDown https://github.com/primefaces/primereact/issues/855
  • [ ] Calendar
  • [ ] MultiSelect

mertsincan avatar Apr 22 '19 11:04 mertsincan

  • [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>.

arnauddem avatar Jun 21 '19 13:06 arnauddem

Will you add this support for InputNumber as well? Right now it only has aria-labelledby attribute.

ankitprahladsoni avatar Jun 03 '21 07:06 ankitprahladsoni

aria-* for accessibility and data-* for testing should be passed through on the root of all components.

jeffgaynorspok avatar Jul 19 '21 21:07 jeffgaynorspok

@jeffgaynorspok this feature was added in this ticket: https://github.com/primefaces/primereact/issues/2620

melloware avatar Apr 02 '22 12:04 melloware