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

TabView: allow aria-label attribute for scrollable buttons #3259

Closed
kyybo opened this issue Sep 8, 2022 · 5 comments · Fixed by #3262
Closed

TabView: allow aria-label attribute for scrollable buttons #3259

kyybo opened this issue Sep 8, 2022 · 5 comments · Fixed by #3262
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

Hello !
Is it possible to allow the aria-label attribute on the buttons (previous and next) on each side of the tab headers when you have a scrollable TabView? These generated buttons don't seem to be customizable.

Is your feature request related to a problem?

No response

Describe the solution you'd like

Maybe we could have a scrollableOptions attribute for the TabView component and the properties of these buttons would be used as an object in it (a bit like the virtualScrollerOptions attribute in the DataTable component).

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
@kyybo
Copy link
Contributor Author

kyybo commented Sep 8, 2022

In fact, there are many buttons (or divs with the attribute role='button' or form element), which are generated by components, that do not have an 'aria-label' attribute.
For example :

  • in the DataTable component: the filter button generated by the property filterDisplay='menu' (1)
  • in the DataTable component : the paginator dropdown to select the number of lines to display ('RowsPerPageDropdown') (2)
  • in the MultiSelect component : the button to close the selection list (3)
  • in the MultiSelect component : there is a 'p-hidden-accessible' div which is generated with an input element in it, but this element has no aria-label attribute (4)
  • ect.

(1)
image
(2)
image
(3)
image
(4)
image
image

All these small elements generate accessibility errors.

I know that the accessibility part of PrimeReact is under development and that there is a lot of work to do and things to think about. But I just wanted to know if you are aware of these small defects.

@melloware
Copy link
Member

Yep I have seen these myself when I run Lighthouse on my app.

@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 Status: Discussion Issue or pull request needs to be discussed by Core Team 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 added this to the 8.6.0 milestone Sep 8, 2022
@melloware
Copy link
Member

OK here is what I did in my PR. I reuse the same ARIA labels from PrimeLocale that I use in Paginator buttons.

See: https://github.com/primefaces/primelocale/blob/main/en.json

Locale: https://primefaces.org/primereact/locale/

I am using the nextPageLabel and previousPageLabel

"aria": {
            "trueLabel": "True",
            "falseLabel": "False",
            "nullLabel": "Not Selected",
            "pageLabel": "Page",
            "firstPageLabel": "First Page",
            "lastPageLabel": "Last Page",
            "nextPageLabel": "Next Page",
            "previousPageLabel": "Previous Page"
      }

@melloware
Copy link
Member

@kyybo Can you open separate issue for Datatable Aria label I will fix those too.

@kyybo
Copy link
Contributor Author

kyybo commented Sep 8, 2022

@melloware Alright I'll do it. Thank you !

@mertsincan mertsincan added the Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add label Sep 22, 2022
melloware added a commit to melloware/primereact that referenced this issue 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
3 participants