-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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(lemon-ui): Properly indicate clickable and disabled LemonTag #23853
Conversation
@@ -38,8 +38,8 @@ function CategoryPill({ | |||
type={isActive ? 'primary' : canInteract ? 'option' : 'muted'} | |||
data-attr={`taxonomic-tab-${groupType}`} | |||
onClick={canInteract ? onClick : undefined} | |||
weight="normal" | |||
aria-disabled |
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.
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 like there are some failing tests
@@ -492,7 +492,7 @@ export function StatusTag({ survey }: { survey: Survey }): JSX.Element { | |||
} as Record<ProgressStatus, LemonTagType> | |||
const status = getSurveyStatus(survey) | |||
return ( | |||
<LemonTag type={statusColors[status]} style={{ fontWeight: 600 }} data-attr="status"> |
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.
Wonder how this crept in past the eslint rule? It was only added 3 months ago
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.
It looks like the rule only applies to props on HTML elements, and not React components 🤔
📸 UI snapshots have been updated1 snapshot changes in total. 0 added, 1 modified, 0 deleted:
Triggered by this commit. |
📸 UI snapshots have been updated2 snapshot changes in total. 0 added, 2 modified, 0 deleted:
Triggered by this commit. |
a759903
to
447478f
Compare
Size Change: +107 B (+0.01%) Total Size: 1.07 MB ℹ️ View Unchanged
|
Problem
It was weird that clickable but disabled tags behaved like text:
For some reason, all tags in that TaxonomicFilter UI were also marked
aria-disabled
, always.Changes
Clickable tags now behave more like buttons (which they effectively are) and are accessible.