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

site: make REPL user menu keyboard accessible #8831

Merged
merged 6 commits into from
Jun 27, 2023
Merged

Conversation

geoffrich
Copy link
Member

@geoffrich geoffrich commented Jun 24, 2023

Closes sveltejs/sites#494

The current user menu in the REPL wasn't keyboard- or AT- accessible since it only activated on hover. I refactored it to activate on click/button trigger instead. Clicking outside or moving focus outside the menu auto-closes it.

Briefly toyed around with also activating it on hover, but that made things too confusing. I think the chevron icon is a clear enough indication that this is interactable (and on mobile you had to tap it anyway).

Some of the icons increase opacity on hover - I updated things to increase opacity on focus as well.

Also refactored some of the styles to use flexbox, since that made things cleaner.

Since this PR bumps site-kit, it also includes a few changes from the latest release (removing the background blur on the search overlay and fixing the double-underline on nav links)

Screenshots

Desktop

image image

Mobile

image

Before submitting the PR, please make sure you do the following

  • It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
  • Prefix your PR title with feat:, fix:, chore:, or docs:.
  • This message body should clearly illustrate what problems it solves.
  • Ideally, include a test that fails without this PR but passes with it.

Tests and linting

  • Run the tests with pnpm test and lint the project with pnpm lint

@geoffrich geoffrich marked this pull request as ready for review June 27, 2023 02:45
@geoffrich geoffrich requested review from PuruVJ and dummdidumm and removed request for PuruVJ June 27, 2023 02:46
@dummdidumm dummdidumm merged commit 2a93ca9 into master Jun 27, 2023
@dummdidumm dummdidumm deleted the grich/repl-menu-a11y branch June 27, 2023 06:24
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.

REPL user menu is inaccessible
2 participants