-
Notifications
You must be signed in to change notification settings - Fork 566
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
ActionList: Allow items to remain focusable when disabled #4481
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: 39e8c3f 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 |
size-limit report 📦
|
Should require only one change in Dotcom (a modification to a test), other than that it appears that the tests related to this change pass. |
That's great! It looks like we can only make the dotcom change after merging this PR, correct? |
@siddharthkp, yup that should be it! |
This PR should be ready for a review! cc: @primer/engineer-reviewers |
const menuItemProps = { | ||
onClick: clickHandler, | ||
onKeyPress: !buttonSemantics ? keyPressHandler : undefined, | ||
'aria-disabled': disabled ? true : undefined, | ||
'data-inactive': inactive ? true : undefined, | ||
'data-loading': loading && !inactive ? true : undefined, | ||
tabIndex: disabled || showInactiveIndicator ? undefined : 0, | ||
tabIndex: focusable ? undefined : 0, |
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.
Am i reading this wrong or does this feel opposite of what it says?
when focusable=true, we remove tabIndex with tabIndex: undefined
and
when focusable=false, we set tabIndex to 0 (which would make it focusable?)
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.
This is mainly adding an additional conditional and placing it in focusable
.
(disabled && !inferredItemRole) || showInactiveIndicator
instead of disabled || showInactiveIndicator
This change will only apply if the container is an ActionMenu
or a SelectPanel
, otherwise the functionality will remain the same. So if an item inside of an ActionMenu
is disabled, it will receive 0
.
Let me know if we should opt for a different name here, or if it's still confusing!
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.
Left 1 comment for potential bug (everything else looks good)
Hi! This pull request has been marked as stale because it has been open with no activity for 60 days. You can comment on the pull request or remove the stale label to keep it open. If you do nothing, this pull request will be closed in 7 days. |
👋 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! |
👋🏻 @TylerJDev just checking in here, as I see this one has been open for a while. What's the remaining effort to get this over the line? Is this likely to be a MAS C* blocker? |
Hey @lesliecdubs! The effort remaining is small. I paused on this temporarily, but should have enough capacity to get this through. I don't believe it will be a MAS*C blocker, but is definitely an improvement for usability & accessibility. |
Hi! This pull request has been marked as stale because it has been open with no activity for 60 days. You can comment on the pull request or remove the stale label to keep it open. If you do nothing, this pull request will be closed in 7 days. |
👋 Hi from github/github! Your integration PR is ready: https://github.com/github/github/pull/357125 |
🔴 golden-jobs completed with status |
Allows
disabled
items inActionMenu
andSelectPanel
to remain focusable. This stems from feedback we've received from the Accessibility Team.Changelog
Integration test PR: https://github.com/github/github/pull/324056
Passes with small modifications (minus flakey tests), requires only one change to a test in Dotcom.
Changed
ActionList.Item
to keep focus if it's within anActionMenu
orSelectPanel
context.Rollout strategy
Testing & Reviewing
Merge checklist