primereact icon indicating copy to clipboard operation
primereact copied to clipboard

DataTable RowCheckbox/RowRadioButton input lacks title, label or aria attributes

Open RJForgie opened this issue 6 years ago • 1 comments

I'm submitting a ... (check one with "x")

[ x ] bug report
[ ] feature request
[ ] support request 

Current behavior The hidden accessible RowCheckbox inputs rendered by the DataTable lacks accessibility attributes required by screen readers.

Using the tool https://github.com/squizlabs/HTML_CodeSniffer

We get the warning: "This checkboxinput element does not have a name available to an accessibility API. Valid names are: label element, title, aria-label, aria-labelledby."

Expected behavior Checkbox inputs have the necessary attributes required for screenreaders. This can be achieved by adding one or more of the above mentioned attributes.

Minimal reproduction of the problem with instructions Issues can be seen in this file on line 60 / 61: <input type="checkbox" defaultChecked={this.props.selected} disabled={this.props.disabled} aria-checked={this.props.selected} onKeyDown={this.onKeyDown} onFocus={this.onFocus} onBlur={this.onBlur}/>

  • PrimeReact version: 3.3.3

  • Browser: [all]

  • Language: [all]

RJForgie avatar Feb 03 '20 15:02 RJForgie

What to use as the value, should it be a prop?

cagataycivici avatar Mar 12 '20 11:03 cagataycivici

Fixed with https://github.com/primefaces/primereact/issues/3263

melloware avatar Sep 14 '22 21:09 melloware