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

Background styles for focused action list item #1158

Merged
merged 3 commits into from
May 20, 2021

Conversation

dgreif
Copy link
Member

@dgreif dgreif commented Apr 9, 2021

Work in #1135 revealed that ActionListItems were not focusable, and when made focusable, their styling was not correct.

  • Make list items focusable by setting tabindex="-1". useFocusZone will latch onto this and set the tab index to 0 when enabled.
  • Add background colors/remove outline when items are focused.
  • Added focus zone to the ActionList story to make focus state easier to test

Closes #1180

Screenshots

Before

Gray is hover, outline is focused
image

After

Lighter is hover, darker is focus
image
image

Dark Mode

image

Dark Dimmed Mode

image

Merge checklist

  • Added/updated tests
  • Added/updated documentation
  • Tested in Chrome
  • Tested in Firefox
  • Tested in Safari
  • Tested in Edge

@changeset-bot
Copy link

changeset-bot bot commented Apr 9, 2021

🦋 Changeset detected

Latest commit: 2647438

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@primer/components Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link

vercel bot commented Apr 9, 2021

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/primer/primer-components/GQV7e72mepwCA26ScBsbegfRcxwv
✅ Preview: https://primer-components-git-action-list-state-backgrounds-primer.vercel.app

@dgreif dgreif force-pushed the action-list-state-backgrounds branch from 23ccfc0 to 40813d3 Compare May 12, 2021 23:00
@vercel vercel bot temporarily deployed to Preview May 12, 2021 23:01 Inactive
@dgreif dgreif force-pushed the action-list-state-backgrounds branch from 40813d3 to eea3bb7 Compare May 19, 2021 21:07
@vercel vercel bot temporarily deployed to Preview May 19, 2021 21:07 Inactive
@dgreif dgreif requested a review from colebemis May 19, 2021 21:09
@dgreif dgreif force-pushed the action-list-state-backgrounds branch from eea3bb7 to 8ff3d48 Compare May 19, 2021 21:20
@vercel vercel bot temporarily deployed to Preview May 19, 2021 21:20 Inactive
@dgreif dgreif force-pushed the action-list-state-backgrounds branch from 8ff3d48 to c5ad77f Compare May 19, 2021 23:24
@vercel vercel bot temporarily deployed to Preview May 19, 2021 23:24 Inactive
@vercel vercel bot temporarily deployed to Preview May 20, 2021 20:52 Inactive
@vercel vercel bot temporarily deployed to Preview May 20, 2021 20:58 Inactive
@dgreif dgreif enabled auto-merge (squash) May 20, 2021 20:59
@dgreif dgreif merged commit c199131 into main May 20, 2021
@dgreif dgreif deleted the action-list-state-backgrounds branch May 20, 2021 21:03
@github-actions github-actions bot mentioned this pull request May 20, 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
Development

Successfully merging this pull request may close these issues.

DropdownMenu and ActionMenu focus styles need background colors
3 participants