-
Notifications
You must be signed in to change notification settings - Fork 31
fix(InfoTip)!: Remove aria-live and implement focus mgmt #3215
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
|
View your CI Pipeline Execution ↗ for commit d84e955 ☁️ Nx Cloud last updated this comment at |
Co-authored-by: Kenny Lin <kenny.lin.91@gmail.com>
Co-authored-by: Kenny Lin <kenny.lin.91@gmail.com>
LinKCoding
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.
Looks great!
Left a quick note for your consideration~
| export type InfoTipPropsWithoutAria = Omit< | ||
| InfoTipProps, | ||
| 'ariaLabel' | 'ariaLabelledby' | ||
| > & { |
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 Omit makes me think that InfoTipPropsWithAriaLabel and InfoTipPropsWithAriaLabelledby can share an InfoTipsBaseProps (that get exported and used here)
and then the aria-* specific props be part of a discriminated union.
Food for thought :)
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3215 +/- ##
==========================================
- Coverage 89.65% 89.09% -0.57%
==========================================
Files 353 236 -117
Lines 5065 4309 -756
Branches 1606 1469 -137
==========================================
- Hits 4541 3839 -702
+ Misses 516 462 -54
Partials 8 8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
LinKCoding
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.
Looked over Radio, CheckBox with InfoTip
and GridForm (which had a Radio with InfoTip)
and the VO announces the label now too! 🔥
|
📬 Published Alpha Packages: |
|
🚀 Styleguide deploy preview ready! Preview URL: https://697b78bc197ea9db1afb4732--gamut-preview.netlify.app |
Overview
Adds props to InfoTip for customizing the button's
aria-labelandaria-labelledbyattribute. Also adds automatic focus management - when you open an InfoTip, focus moves to the content container. This removed aria-live since it's no longer needed.PR Checklist
Testing Instructions
Auto-focus + keyboard nav (verify tab order makes sense!):
Floating without links:
Defaultstory withplacement: "floating"Floating with links:
WithLinksOrButtonsstoryInline without links:
Defaultstory (default inline placement)Inline with links:
GridForm + ConnectedForm
Screen reader check:
Finish and do a celebratory dance 🎉
PR Links and Envs