-
Notifications
You must be signed in to change notification settings - Fork 598
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
[UnderlineNav2]: Deprecate coarse input detection and its scroll behaviour (A11y sign-off remediations) #2447
Conversation
🦋 Changeset detectedLatest commit: 6c076f1 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 📦
|
@ericwbailey @danielguillan Storybook link: https://primer-bebeaa10ea-13348165.drafts.github.io/storybook/?path=/story/components-underlinenav--default-nav I didn't add anything extra yet (except some UI design adjustments which shouldn't affect the behaviour) because I have a few questions around the items on the comment. Mostly accessibility.
Currently the
We have it already from the ActionList component ✅
Our current overflow behaviour does this. I would appreciate a confirmation though to make sure if we are are talking about the same thing
Currently we take the item out of the menu when it is selected and pop it into the list as the last item. So disclosure widget would actually never get to have an active nav link with the current behaviour. If this behaviour is not desirable , I might want to chat it more in dept. If the behaviour is okay, we might not need to do anything else for this matter because the selected nav item itself has
I am not sure if I understand this correctly. When the nav item's name matches the landmark's (nav) aria-label, we will need to wrap the Re the keyboard navigation, current implementation only work with arrow keys in the menu (disclosure widget). Is that what we need or do we need to bind Thank you so much in advance 🙏🏼 |
So, it's good that it is present in the APG example, in that things that support it will utilize it. However, not including it isn't detrimental, provided the disclosure widget's content is placed immediately after the disclosure widget's button in the DOM.
I think I could have been more clear about this, apologies. I believe the feedback was to provide a visually-hidden heading element before the <div class="underline-nav-wrapper">
<h2 class="sr-only">
Code navigation
</h2>
<nav aria-label="Code">
<!-- UnderlineNav internals -->
</nav>
</div> The reason for this is headings are used far more frequently than landmarks as a navigation/discoverability aide, but this approach allows us to utilize both.
The thing we are trying to avoid is having only one list item in the "More" nav. If a user cannot see the screen, they may be confused as to why a single list item is present, and mistakenly go looking for the other "missing" list content.
Yep! I am now wondering if, with this friction, should we have a discrete disclosure widget pattern added to Primer? |
@ericwbailey Thanks for clarifying that! The issue here for us is that the Action Menu is a portal and portals hierarchically exist outside of the parent component. So I guess we don't have any cue that the Re the sr-only heading, thanks for the clarification, it makes sense! I'll implement that. Avoiding having only one list item in the more menu, I see what you mean and thanks for the explanation! @danielguillan how should we proceed with this? Thinking of a little bit edge case where only 2 items but long items and one is selected; how should it behave in this case? |
@ericwbailey can you provide more details on how this pattern would work?
This makes a lot of sense. I think we have two options here:
@broccolinisoup I think we could test Eric's idea first and see how it works. |
I think it would probably be more on the low-level/primitive end of things. Essentially we'd want a way to have a button toggle that reveals associated child navigation content. This pattern is a little different than existing components, as I understand them:
I'm also unsure if ActionMenu/ActionList's props allow us to configure it into a disclosure navigation widget, especially with @broccolinisoup's comment about it being a portal component. Disclosure widgets are typically highly contextual, so it feels like we'd be working against that component pairing's grain. |
@ericwbailey thank you for clarifying! |
4328850
to
81dcd14
Compare
@ericwbailey Thanks for clarifying! I feel like we need a combination of all of those components you mentioned above 🙂 I tried to whip something up quickly today, mainly to get something more tangible for us to discuss from. You can see the half baked prototype here . Please note that It is a very raw example, so most of the keyboard navigation doesn't work and styles are just there to demonstrate the main functionality. I discarded the ActionMenu due to being portal and ActionList.Item due to not using the
These are the behaviours I think we will need for the disclosure widget pattern as far as I understand. Please add if I miss anything. I am looking forward to hearing what you think and if this is something we can build from. @danielguillan Appreciate you both 🙇🏼♀️ |
74387fa
to
4247884
Compare
@ericwbailey @danielguillan I created another PR for the disclosure pattern : #2466 Could we continue the convo there please? |
9391d0d
to
611c1a5
Compare
611c1a5
to
88e4586
Compare
</Box> | ||
) : ( | ||
counter !== undefined && ( |
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.
Context: the type of the counter
is string | number
and not every item has to have a counter.
@colebemis Could I please get a review from you on this one? |
88e4586
to
7ac221a
Compare
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.
💖
…#2448) * react router implementation fixes * add changeset
…ading counter for all (#2449) * string type for counters and fix loading issue * add changeset * improve docs * update animation details * Inverte the pulse effect Co-authored-by: Daniel Guillan <[email protected]> Co-authored-by: Daniel Guillan <[email protected]>
7ac221a
to
6c076f1
Compare
This PR removes detecting the pointer type and coarse pointer's scroll behaviour according to @ericwbailey 's https://github.com/github/primer/issues/1112#issuecomment-1281157150 on the sign-off review.
Storybook link: https://primer-bebeaa10ea-13348165.drafts.github.io/storybook/?path=/story/components-underlinenav--default-nav
Docs link: https://primer-bebeaa10ea-13348165.drafts.github.io/drafts/UnderlineNav2
What should code reviewers look at?
This PR mainly addresses removing the scroll overflow behaviour. As long as the main overflow behaviour (Pulling items into the overflow
More
menu when they don't fit into the screen) works regardless of the pointer type, this PR's main functionality should be good ✨There are 2 merged PRs' commits in the history
Merge checklist
Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.