-
Notifications
You must be signed in to change notification settings - Fork 645
Tentative focus fix in action list item #4166
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
Conversation
🦋 Changeset detectedLatest commit: ecb8af8 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 📦
|
fba7e40 to
a2beb45
Compare
|
@pksjce was trying to re-create this issue again on dotcom and am having trouble getting the shortcut to trigger the menu 🤔 I just get the screen jumping all the way to the bottom. Was curious if others are observing the same or if it was just me. |
|
@joshblack, yup I'm getting the same behavior. I've asked this in one of the slack channels to see if this functionality was removed or not. |
|
Hi @TylerJDev @joshblack , I see that they seemed to have fixed this. Though I'm still having some challenges getting it working. I'm trying to get a review lab out so we can test the fix |
|
@pksjce, @joshblack, I'm now able to open the menu in code view. Let me know if you need an additional look within the review lab too! |
|
I also noticed a bug that this PR seems to fix. Opening up an Screen.Recording.2024-02-02.at.9.35.02.AM.movVideo description: I'm in a Storybook story for @pksjce, @joshblack, could y'all try reproducing this to see if it's the same behavior for all of us? Here are the reproduction steps:
|
|
@TylerJDev is this an implementation behavior of Safari where it does not show focus if the menu is opened with a click and then keyboard is used? The list items clearly have focus, and The fix above totally works because the |
Bumps [@babel/cli](https://github.com/babel/babel/tree/HEAD/packages/babel-cli) from 7.22.10 to 7.23.9. - [Release notes](https://github.com/babel/babel/releases) - [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md) - [Commits](https://github.com/babel/babel/commits/v7.23.9/packages/babel-cli) --- updated-dependencies: - dependency-name: "@babel/cli" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [terser](https://github.com/terser/terser) from 5.17.6 to 5.27.0. - [Changelog](https://github.com/terser/terser/blob/master/CHANGELOG.md) - [Commits](terser/terser@v5.17.6...v5.27.0) --- updated-dependencies: - dependency-name: terser dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…4186) Bumps [@storybook/source-loader](https://github.com/storybookjs/storybook/tree/HEAD/code/lib/source-loader) from 7.6.7 to 7.6.10. - [Release notes](https://github.com/storybookjs/storybook/releases) - [Changelog](https://github.com/storybookjs/storybook/blob/next/CHANGELOG.md) - [Commits](https://github.com/storybookjs/storybook/commits/v7.6.10/code/lib/source-loader) --- updated-dependencies: - dependency-name: "@storybook/source-loader" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* Improve aria-labels for example icon buttons and add guidance * test(vrt): update snapshots --------- Co-authored-by: joshblack <[email protected]>
* chore(deps): bump @github/combobox-nav from 2.1.7 to 2.3.1 Bumps [@github/combobox-nav](https://github.com/github/combobox-nav) from 2.1.7 to 2.3.1. - [Release notes](https://github.com/github/combobox-nav/releases) - [Commits](github/combobox-nav@v2.1.7...v2.3.1) --- updated-dependencies: - dependency-name: "@github/combobox-nav" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * test: add fallback for Element#scrollIntoView * chore: fix eslint warning --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Josh Black <[email protected]>
* oof * Create thirty-mirrors-switch.md * test(vrt): update snapshots * fix missing var * fix parens * test(vrt): update snapshots --------- Co-authored-by: langermank <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
joshblack
left a comment
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.
LGTM to fix this in the interim while we figure out what on earth is going on 😅
Closes https://github.com/github/accessibility-audits/issues/4641
Bug description
The bug specifically occurs in one case where the action menu does not have a visible anchor and is programmatically opened through a keyboard shortcut combination. Specifically in the code viewer, on hitting the SHIFT + CTRL + C combination, you can see the actionmenu emerge at the cursor position. This action menu can also be accessed at the line level through an anchor thats only visible on focus.
The actual bug is that the focus does not shift from the cursor position into the action menu's first item as expected.
This bug has been especially challenging because it is hard to reproduce in it's entireity. One can fiddle around with tab button and fix the focus params such that the bug becomes nonexistent. Also I was not successful in creating a minimum reproduction of the issue in a storybook. #4025 . Any advise on fixing this is welcome.
Root cause analysis
The current theory is that as per the spec on
focus-visiblehttps://drafts.csswg.org/selectors/#indicate-focus , these lines tell us what could the problem be.So if the focus shifts programmatically then the spec does not require to apply the focus-visible pseudo class.
Proposed fix
After much deliberation, I think our best chance is to fix the issue to our best of knowledge and see if it fixes the actual issue.
We will make sure that the first item in action menu always receives focus when it opens by more robust css. This should be the right solution.
Rollout strategy
Merge checklist