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

VerticalBar: The use of keyboard is not standard / perceptible #5168

Closed
marcoscv-work opened this issue Nov 2, 2022 · 9 comments · Fixed by #5177
Closed

VerticalBar: The use of keyboard is not standard / perceptible #5168

marcoscv-work opened this issue Nov 2, 2022 · 9 comments · Fixed by #5177
Assignees
Labels
comp: accessibility Issues related to accessibility in general type: bug Issues reporting that Component is not doing what should be done

Comments

@marcoscv-work
Copy link
Member

Using keyboard is not standard / perceptible

Accessibility improvement: fix proposed in order to use VerticalBar in DXP.

Context:

This VerticalBar component: Visually “Icons > Panels” are just vertical tabs so the behaviour should be like tabs.

¿How are tabs defined in Clay? As a role=“tablist”:
https://clayui.com/docs/components/tabs.html

In aria is pretty similar behaviour:
https://www.w3.org/WAI/ARIA/apg/example-index/tabs/tabs-automatic.html#tablist-1

and the last example of panels use, google (gmail for example right panels):
Following these examples is easy to define the pattern based on clay/aria with some improvements based on google (they invested on accessibility a lot).

image

So, the detailed description:

1º We get to the tabs focusing the active tab, if there are not an active tab we go directly to the first item (the rest of them have tabindex=“-1”).
2º If we are in the button-tabs component we can use arrow up/down to move between button-tabs
3º If we are over a button-tab and we press enter/space we show that panel and move the focus to the first focusable item or making a general focus on the panel/sidebar
4º If we get to the componen by focus and we have a panel active we will focus to the button first and next item will be the sidebar/panel
5º We use correct markup and labelling:
https://www.w3.org/WAI/ARIA/apg/example-index/tabs/tabs-manual.html#rps_label
6º If we are in the button-tabs component and press tab-key we will go to next element (the sidebar if it is expanded/opened)

@marcoscv-work marcoscv-work added type: bug Issues reporting that Component is not doing what should be done comp: accessibility Issues related to accessibility in general labels Nov 2, 2022
@matuzalemsteles
Copy link
Member

cc @drakonux @emiliano-cicero

@marcoscv-work
Copy link
Member Author

They already know them. @drakonux @emiliano-cicero please confirm.

Pattern already applied to DXP successfully:
liferay-echo/liferay-portal#10169

@matuzalemsteles
Copy link
Member

Great, just so that these things are also documented for the future in case someone says something...

@marcoscv-work
Copy link
Member Author

We are beginning to have a great debt, thanks @matuzalemsteles !

@marcoscv-work
Copy link
Member Author

Sorry, I'm late with this, It should include aria-orientation="vertical" since tabs are horizontal by default:

image

@drakonux
Copy link
Member

drakonux commented Nov 4, 2022

Hey, sorry for the delay. The behavior that we defined some time ago is the following:

  • Tab key, the focus moves to the next focusable component.
  • Shift + Tab. the focus moves to the previous focusable component.
  • ↓ or ↑, the focus moves to the next/previous tab item in a wrap from last to first and vice versa.

tab-order-vertical-bar

Correct me if I'm wrong @marcoscv-work , but it's what you demand now.

@matuzalemsteles
Copy link
Member

Thanks @marcoscv-work and @drakonux for the details!

@marcoscv-work
Copy link
Member Author

@drakonux I think the definition is perfect, a perfect match with what accessibility needs.

@matuzalemsteles thanks!

@github-actions
Copy link

github-actions bot commented Nov 8, 2022

This issue has been merged and will be released in DXP at https://issues.liferay.com/browse/LPS-166807

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp: accessibility Issues related to accessibility in general type: bug Issues reporting that Component is not doing what should be done
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants