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

2565: Scalable keyboard accessibility for Dropdown in User Settings Dialog #2691

Merged
merged 23 commits into from
Jun 15, 2022

Conversation

wdoberschuetz
Copy link
Contributor

Changes proposed in this pull request:

  • handling of the keyboard up and down arrows, as well as confirmation with enter as per description in the ticket

Related issue(s)
#2565

@wdoberschuetz wdoberschuetz changed the title 2565: Work in progress 2565: Scalable keyboard accessibility for Language Dropdown in User Setttings Dialog Apr 29, 2022
@wdoberschuetz wdoberschuetz added the WIP Work in progress label May 2, 2022
@wdoberschuetz wdoberschuetz removed the WIP Work in progress label May 2, 2022
@ndricimrr ndricimrr added A11Y Accessibility dxp enhancement New feature or request labels May 2, 2022
@UlianaMunich UlianaMunich self-assigned this May 3, 2022
@UlianaMunich UlianaMunich changed the title 2565: Scalable keyboard accessibility for Language Dropdown in User Setttings Dialog 2565: Scalable keyboard accessibility for Dropdown in User Settings Dialog May 4, 2022
@UlianaMunich
Copy link
Contributor

Please make sure the selector of the dropdown can be applied to any dropdown independently from the language, index, aria-label, placeholder, etc. Most likely the unique class or id added to the HTML might help. Keeping in mind there might be different content inside of the dropdown we call "language dropdown" and there could be multiple dropdowns on the same view.

@UlianaMunich
Copy link
Contributor

UlianaMunich commented May 6, 2022

Couple of things to adjust from my side.

  • There is an example that DXP is referring to and using a lot when it comes to components' behavior. here. Please use it to mimic the behavior in our code.

  • The dropdown can't be opened now on the "Enter" key-press, same as it does now on the "Space" key-press. Please check it. It did working the past

  • Regarding the active state of the selected item in the dropdown. When the dropdown is open, the focus has to be on a selected item. Once the arrow up or down is pressed, the focus needs to show which item is in focus without adding the "is-sected" class. The "is-selected" class is only applied if the "Enter" key was pressed.

  • if you might have a possibility to add E2E tests, it would be amazing.

Thank you!

@wdoberschuetz wdoberschuetz added the WIP Work in progress label May 6, 2022
Copy link
Contributor

@UlianaMunich UlianaMunich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is an example of the arrow behavior from the openUI5. When a user clicks on the arrow the focus should show the navigation, while the selected item stays the same. Once a user clicks on Enter the new item is selected.
Screenshot 2022-05-23 at 21 16 31

Comment on lines 149 to 153
list.item(chosenElementIndex).classList.remove('is-selected');
list.item(chosenElementIndex).classList.remove('is-focus');
chosenElementIndex += 1;
list.item(chosenElementIndex).classList.add('is-selected');
list.item(chosenElementIndex).classList.add('is-focus');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these lines repeated quite often, could you optimize it and remove console.log?

@wdoberschuetz wdoberschuetz removed the WIP Work in progress label May 31, 2022
@wdoberschuetz wdoberschuetz added the WIP Work in progress label Jun 2, 2022
@wdoberschuetz wdoberschuetz removed the WIP Work in progress label Jun 3, 2022
Copy link
Contributor

@UlianaMunich UlianaMunich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Great job!

@wdoberschuetz wdoberschuetz merged commit 79db7e6 into master Jun 15, 2022
@wdoberschuetz wdoberschuetz deleted the 2565-language-dropdown branch June 15, 2022 05:59
@ndricimrr ndricimrr mentioned this pull request Jun 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A11Y Accessibility dxp enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants