-
Notifications
You must be signed in to change notification settings - Fork 616
fix: Add an indicator for disabled ActionList items (e.g. in a SelectPanel) #6246
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
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 27527b5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
👋 Hi, this pull request contains changes to the source code that github/github depends on. If you are GitHub staff, we recommend testing these changes with github/github using the integration workflow. Thanks! |
size-limit report 📦
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few ideas!
&::after { | ||
@mixin activeIndicatorLine; | ||
/* stylelint-disable-next-line primer/colors */ | ||
background: var(--fgColor-muted); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
background: var(--fgColor-muted); | |
background: var(--bgColor-neutral-emphasis); |
/* gray accent line */ | ||
&::after { | ||
@mixin activeIndicatorLine; | ||
/* stylelint-disable-next-line primer/colors */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/* stylelint-disable-next-line primer/colors */ |
background: transparent; | ||
|
||
/* provides a visual indication of the current item for Windows high-contrast mode */ | ||
outline: 2px solid var(--control-transparent-bgColor-selected); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
background: transparent; | |
/* provides a visual indication of the current item for Windows high-contrast mode */ | |
outline: 2px solid var(--control-transparent-bgColor-selected); | |
background: var(--control-transparent-bgColor-disabled); |
I wonder if this might look a little cleaner? Just guessing, I haven't tried it
Part of https://github.com/github/accessibility-audits/issues/11962 (Hubber access only)
This PR adds new indicator styles for disabled ActionList items that are hovered or selected with arrow keys, and a new Storybook story to demo them: “SelectPanel > Features > With Disabled Items”.
Previously, there were no indicator styles at all, so focus would seem to “disappear” when moving past a disabled item.
Note
The
primer_react_select_panel_with_modern_action_list
feature flag must be enabled.Before
Screen recording, without audio, showing how focus “disappeared” before.
Before.mov
After
Screen recording, without audio, showing how focus indication is now preserved.
After.mov
Changelog
New
Changed
ActionList
items now have a visible indicator when hovered or selected.Removed
Rollout strategy
Testing & Reviewing
Check out the newly-added Storybook story. I’ll update this PR body with a link once it’s available.
Merge checklist