Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataTable: Aria-label issues #3263

Closed
kyybo opened this issue Sep 8, 2022 · 4 comments · Fixed by #3265
Closed

DataTable: Aria-label issues #3263

kyybo opened this issue Sep 8, 2022 · 4 comments · Fixed by #3265
Assignees
Labels
Component: Accessibility Issue or pull request is related to WCAG or ARIA Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Milestone

Comments

@kyybo
Copy link
Contributor

kyybo commented Sep 8, 2022

Describe the feature you would like to see added

Some elements (buttons or form elements) generated by the DataTable component do not have an 'aria-label' attribute.
Here is the list of the ones I spotted:

(1) The filter button generated by property filterDisplay='menu
(2) The paginator dropdown menu to select the number of rows to display. This element generates a 'p-hidden-accessible' div with an input element (with role="textbox") in it, but this input has no aria-label attribute. It also generates a 'p-dropdown-trigger' div with the role 'button' and this div has no aria-label attribute
(3) The radio buttons and checkboxes generated in selection mode

(1)
image
image

(2)
image
image
image

(3.1)
image
image
(3.2)
image
image

Is your feature request related to a problem?

No response

Describe the solution you'd like

An 'aria-label' attribute should be added to these elements. We can also consider being able to modify them if we want.

Describe alternatives you have considered

No response

Additional context

No response

@kyybo kyybo added Status: Discussion Issue or pull request needs to be discussed by Core Team Type: New Feature Issue contains a new feature or new component request labels Sep 8, 2022
melloware added a commit to melloware/primereact that referenced this issue Sep 8, 2022
@melloware melloware self-assigned this Sep 8, 2022
@melloware melloware removed the Status: Discussion Issue or pull request needs to be discussed by Core Team label Sep 8, 2022
@melloware melloware added this to the 8.6.0 milestone Sep 8, 2022
@melloware melloware added Component: Accessibility Issue or pull request is related to WCAG or ARIA and removed Type: New Feature Issue contains a new feature or new component request labels Sep 8, 2022
@melloware
Copy link
Member

Not sure what to make the accessibility text for the radio and checkbox?

melloware added a commit to melloware/primereact that referenced this issue Sep 8, 2022
melloware added a commit to melloware/primereact that referenced this issue Sep 8, 2022
melloware added a commit to melloware/primereact that referenced this issue Sep 8, 2022
@kyybo
Copy link
Contributor Author

kyybo commented Sep 8, 2022

Not sure what to make the accessibility text for the radio and checkbox?

In my opinion, accessible names for the radio and checkbox must describe the element we selected thank to it.
In this case, I have no idea other than 'row-1', 'row-2', etc. by default. Or 'row-1-selector', 'row-2-selector', ...

@kyybo
Copy link
Contributor Author

kyybo commented Sep 8, 2022

Another solution for the radio and checkbox accessibilty text : rather than using numbers we can specify a column of the table.

With this table :
image
we will have an attribute like : labelledby-field="name" and the checkboxes aria-label will be "James Butt row", "Josephine Darakjy row", etc

@melloware
Copy link
Member

melloware commented Sep 8, 2022

Yep I think I need to add a selectionAriaLabel so you can do selectionAriaLabel="name" and then the label would be "Select John Smith" or "Select Harry Williams". or "Unselect Harry Williams" if checked.

melloware added a commit to melloware/primereact that referenced this issue Sep 8, 2022
melloware added a commit to melloware/primereact that referenced this issue Sep 8, 2022
melloware added a commit to melloware/primereact that referenced this issue Sep 8, 2022
melloware added a commit to melloware/primereact that referenced this issue Sep 9, 2022
@mertsincan mertsincan added the Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add label Sep 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Accessibility Issue or pull request is related to WCAG or ARIA Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants