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

fix(ui5-select): keyboard/selection handling improvement #2907

Merged
merged 7 commits into from
Mar 30, 2021

Conversation

dobrinyonkov
Copy link
Contributor

@dobrinyonkov dobrinyonkov commented Mar 4, 2021

Fixes: #2806
Fixes: #2846

When we open the picker, the focus goes to the static area (listitems). Closing the picker returns the focus to ui5-select. The problem is that than screen readers read the landmark information of the components above.

Summary of chagnes:

  • When picker is opened the focus never leaves the ui5-select.
  • Only visual focus is applied to the select options.
  • Arrow navigation is now handled by ui5-select even when picker is opened.
  • Failing tests no longer rely on the global state (Select: regularly failing test #2846).

Copy link
Contributor

@fifoosid fifoosid left a comment

Choose a reason for hiding this comment

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

Looks good to me from code POV, just some docs to improve.

Waiting for another review from @SAP/ui5-webcomponents-topic-p when it comes to functionality and requirements before we merge it.

packages/main/src/Option.js Show resolved Hide resolved
@dobrinyonkov dobrinyonkov force-pushed the select-focus-improvement branch from 3421ec8 to 06de8fb Compare March 11, 2021 07:46
@nnaydenow
Copy link
Contributor

Test it locally and it works fine.

@dobrinyonkov dobrinyonkov requested a review from nnaydenow March 17, 2021 09:26
Opening the picker moves the focus to the static area. When then closed the focus returns to the ui5- select.
When ui5-select is nested in elements with landmark roles, their accesbility information is read out every time the picker is closed.

Component is now refactor so focus never leaves the ui5-select DOM.
All navigation and selection (Arrows, Space, Enter, Mouse) is now handled by ui5-select.
@dobrinyonkov dobrinyonkov force-pushed the select-focus-improvement branch from 01c9fe5 to 7d86706 Compare March 18, 2021 13:15
@dobrinyonkov dobrinyonkov requested a review from fifoosid March 19, 2021 07:51
@fifoosid fifoosid merged commit f18fd45 into SAP:master Mar 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants