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 keyboard nav on login screen #12956

Merged
merged 9 commits into from
Jan 6, 2025
Merged

Conversation

aalves08
Copy link
Member

@aalves08 aalves08 commented Dec 27, 2024

Summary

Fixes #12775

Occurred changes and/or fixed issues

  • Fix keyboard navigation on login screen
  • checkbox is now visibly focusable
  • add role="button" to AsyncButton
  • Password component is now tabbable
  • refactor LocaleSelector component to work with keyboard navigation (login mode only)

Technical notes summary

Areas or cases that should be tested

  • Go to the login screen and browse the page with the tab key
  • use enter or space key to trigger UI elements on the page

Areas which could experience regressions

Screenshot/Video

Screen.Recording.2024-12-27.at.15.31.14.mov

Checklist

  • The PR is linked to an issue and the linked issue has a Milestone, or no issue is needed
  • The PR has a Milestone
  • The PR template has been filled out
  • The PR has been self reviewed
  • The PR has a reviewer assigned
  • The PR has automated tests or clear instructions for manual tests and the linked issue has appropriate QA labels, or tests are not needed
  • The PR has reviewed with UX and tested in light and dark mode, or there are no UX changes

@aalves08 aalves08 added this to the v2.11.0 milestone Dec 27, 2024
@aalves08 aalves08 self-assigned this Dec 27, 2024
Copy link
Member

@rak-phillip rak-phillip left a comment

Choose a reason for hiding this comment

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

Keyboard navigation is definitely improved, but I'm noting a lot of missing behavior that would satisfy keyboard interactions for the menubar pattern1. Some notable elements that don't align with the APG:

  • When a menu opens, or when a menubar receives focus, keyboard focus is placed on the first item
  • Tab and Shift + Tab do not move focus among the items in the menu
  • Arrow Navigation and Escape behavior are missing

We can discuss more on how we would like to approach these instances, but I suspect that we will replace one-off implementations like these with a standardized component once we address #12771.

Footnotes

  1. https://www.w3.org/WAI/ARIA/apg/patterns/menubar/

shell/components/LocaleSelector.vue Show resolved Hide resolved
@aalves08 aalves08 force-pushed the 12775-login-screen branch from 2361204 to be05331 Compare January 3, 2025 12:31
shell/components/form/Password.vue Outdated Show resolved Hide resolved
shell/components/form/Password.vue Outdated Show resolved Hide resolved
@aalves08
Copy link
Member Author

aalves08 commented Jan 3, 2025

@nwmac going to resolve all of the PR comments that you had around tabbingIndex and tabindex. They will all be cleaned on the next PR commit.

Copy link
Member

@rak-phillip rak-phillip left a comment

Choose a reason for hiding this comment

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

This is looking good. We want to clean up the unused props and I think this will be good to merge.

@aalves08 aalves08 requested a review from rak-phillip January 3, 2025 21:19
@aalves08
Copy link
Member Author

aalves08 commented Jan 3, 2025

@rak-phillip removed the tabbingIndex . Good spot. Thanks

@rak-phillip rak-phillip mentioned this pull request Jan 3, 2025
7 tasks
@aalves08
Copy link
Member Author

aalves08 commented Jan 6, 2025

@rak-phillip fixed and ready for final review 🤞

@aalves08 aalves08 requested a review from rak-phillip January 6, 2025 10:11
shell/components/AsyncButton.vue Outdated Show resolved Hide resolved
shell/components/form/Password.vue Show resolved Hide resolved
shell/components/LocaleSelector.vue Show resolved Hide resolved
@aalves08 aalves08 requested a review from nwmac January 6, 2025 16:17
@aalves08 aalves08 merged commit 7632c51 into rancher:master Jan 6, 2025
34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

a11y: Fix keyboard navigation, role, aria-label and focus display issues on the login screen
3 participants