-
Notifications
You must be signed in to change notification settings - Fork 5k
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
fix: don't render attribute aria-invalid="false"
#20939
Conversation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
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.
Great catch! I appreciate the focus on accessibility here. I've left a suggestion that aligns with how conditional props are passed in some of our other components e.g
metamask-extension/ui/components/component-library/button-base/button-base.tsx
Lines 57 to 60 in 0fa02c5
{...(tag === 'button' ? { disabled } : {})} | |
{...(href && externalLink | |
? { target: '_blank', rel: 'noopener noreferrer' } | |
: {})} |
Also thought the updates to the snapshot were interesting should the underline props be passed down here I'm not familar with the syntax is. Are they special react or redux props?
Builds ready [cb667dc]
Page Load Metrics (1501 ± 43 ms)
Bundle size diffs
|
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## develop #20939 +/- ##
========================================
Coverage 68.25% 68.25%
========================================
Files 1006 1006
Lines 40184 40186 +2
Branches 10742 10744 +2
========================================
+ Hits 27424 27426 +2
Misses 12760 12760
☔ View full report in Codecov by Sentry. |
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.
cb667dc
to
865da64
Compare
@georgewrmarshall haha that's an extremely interesting question about the Storybook! But the I see some evidence that it only updates snapshots if there's a direct code change, and not a change in a 2nd-degree import. Something beyond our current understanding is going on. |
Builds ready [865da64]
Page Load Metrics (1657 ± 41 ms)
Bundle size diffs
|
@georgewrmarshall follow-up discovery
So I think that solves the Storybook mystery. Why it sometimes does not update snapshots, I still don't know. |
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.
Right on! Thanks for the thorough investigation and explanation as always 🙏 LGTM!
@NidhiKJha @DDDDDanica could one of you review this please? I'd love to close the loop on this 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.
LGTM
Explanation
The
Input
andTextField
components both include anaria-invalid="false"
attribute.From the aria-invalid documentation:
Before
After