-
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]: Introduce disclosure widget pattern #2466
Conversation
🦋 Changeset detectedLatest commit: f1e411e 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 |
74387fa
to
4247884
Compare
This comment was marked as outdated.
This comment was marked as outdated.
00b7607
to
177ab6b
Compare
@ericwbailey I apologise again for pointing out the wrong demo. Here is the correct one. I updated the description with items that we introduced with the disclosure pattern. Looking forward to hearing your feedback 🙌🏼 Thank you so much again 🙏🏼 |
size-limit report 📦
|
611c1a5
to
88e4586
Compare
b115613
to
8427af9
Compare
8427af9
to
ef2cb54
Compare
src/UnderlineNav2/styles.ts
Outdated
right: '0', | ||
boxShadow: '0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24)', | ||
borderRadius: '12px', | ||
backgroundColor: `${theme?.colors.canvas.overlay}`, |
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.
Do we need to access this from theme instead of the token name?
backgroundColor: `${theme?.colors.canvas.overlay}`, | |
backgroundColor: 'canvas.overlay' |
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.
Oh I didn't know I can just pass the token name! Thank you 🙌🏼 Is it only for colours as we import only colour primitives currently maybe? I see mix practises around, where can I learn more about this? 👀 or should I just dig in? 😅
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.
I'll do a clean up to remove the other unnecessary theme
args in the next PR!
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.
I left a comment about utilizing a UUID for the id
, but other than that this sounds great to me in AT. Loving the roving tabindex, too!
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.
Looks awesome! Just left a minor comment and wanted to +1 the id
suggestion from @ericwbailey on the <ul>
for the disclosure.
Awesome work ✨
7ac221a
to
6c076f1
Compare
ef2cb54
to
2b1a8d2
Compare
@colebemis following up our conversation around using ActionList.LinkItem instead of ActionList.Item, I have discovered some interesting things today. I currently have 3 issues with the LinkItem
Also please notice my key strokes on the recording 😄 Shoutout to @mperrotti for sharing this app on his DOL talk ✨ ActionList.LinkItem.mp4When ActionList.Item is given There is one more commit left to review in this PR. Previous commits and implementation are reviewed and approved by Eric and Josh. Thanks to you all again for reviewing 💖 |
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.
Latest commit looks good 👍 Ship it 🚢
Co-authored-by: Siddharth Kshetrapal <[email protected]>
…11y remediations) (#2471) * Display at least two items in the menu * add changeset
…esent (#2470) * Add visually hidden heading * add changeset and a test * append 'navigation' to the aria-label string
5c48cdc
to
f1e411e
Compare
Following up the accessibility sign-off review feedback (ref: comment), this PR discarding the
ActionMenu
and introduces a disclosure widget.Storybook test link : https://primer-0a924a1192-13348165.drafts.github.io/storybook/iframe.html?args=&id=components-underlinenav--internal-responsive-nav&viewMode=story
The reasons for discarding the
ActionMenu
areActionMenu
is a portal which means it doesn't follow the button element (that toggles the menu) in the DOM hierarchy. Consideringaria-controls
attribute's poor support, we cannot rely on it therefore, the menu has to follow the button in the DOM order.ActionMenu
is not aligning with the disclosure pattern one. I.e focus trap or only arrow key navigation.What did we introduce? (Disclosure widget pattern)
aria-controls
and its value is the id of the menu.aria-expanded
attribute and conditionally have true / false value.Screenshots
There shouldn't be any visual differences between the
ActionMenu
version and the disclosure widget version.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.