Skip to content

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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

smockle
Copy link
Member

@smockle smockle commented Jun 27, 2025

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

  • Disabled ActionList items now have a visible indicator when hovered or selected.

Removed

Rollout strategy

  • Patch release
  • Minor release
  • Major release; if selected, include a written rollout or migration plan
  • None; if selected, include a brief description as to why

Testing & Reviewing

Check out the newly-added Storybook story. I’ll update this PR body with a link once it’s available.

Merge checklist

@Copilot Copilot AI review requested due to automatic review settings June 27, 2025 19:03
@smockle smockle requested a review from a team as a code owner June 27, 2025 19:03
@smockle smockle requested a review from francinelucca June 27, 2025 19:03
Copy link

changeset-bot bot commented Jun 27, 2025

🦋 Changeset detected

Latest commit: 27527b5

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

This PR includes changesets to release 1 package
Name Type
@primer/react 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

@github-actions github-actions bot added staff Author is a staff member integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm labels Jun 27, 2025
Copy link
Contributor

👋 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!

Copy link
Contributor

github-actions bot commented Jun 27, 2025

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 92.51 KB (0%)
packages/react/dist/browser.umd.js 92.56 KB (0%)

@github-actions github-actions bot requested a deployment to storybook-preview-6246 June 27, 2025 19:09 Abandoned
Copy link
Contributor

@Copilot Copilot AI left a 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.

Copy link
Contributor

@langermank langermank left a 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);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
background: var(--fgColor-muted);
background: var(--bgColor-neutral-emphasis);

/* gray accent line */
&::after {
@mixin activeIndicatorLine;
/* stylelint-disable-next-line primer/colors */
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
/* stylelint-disable-next-line primer/colors */

Comment on lines +346 to +349
background: transparent;

/* provides a visual indication of the current item for Windows high-contrast mode */
outline: 2px solid var(--control-transparent-bgColor-selected);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration-tests: recommended This change needs to be tested for breaking changes. See https://arc.net/l/quote/tdmpakpm staff Author is a staff member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants