-
Notifications
You must be signed in to change notification settings - Fork 204
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
Hot fix/theme disabled #1161
Hot fix/theme disabled #1161
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,6 +37,7 @@ const Checkbox = ({ | |
onChange, | ||
isDisabled, | ||
}) => { | ||
/* TODO move sizes to theme */ | ||
const sizes = { small: "14px", medium: "16px", large: "18px" }; | ||
const theme = useTheme(); | ||
|
||
|
@@ -78,6 +79,10 @@ const Checkbox = ({ | |
fontSize: 13, | ||
color: theme.palette.text.tertiary, | ||
}, | ||
".MuiFormControlLabel-label.Mui-disabled": { | ||
color: theme.palette.text.tertiary, | ||
opacity: 0.25, | ||
}, | ||
Comment on lines
+82
to
+85
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Yo, the opacity check spits straight facts! Looking at the codebase, the 0.25 opacity for disabled checkbox labels is significantly lower than other disabled states:
Let's keep it real - 0.25 opacity is too low for text elements. This could make the form hard to use for folks with visual impairments. Consider:
🔗 Analysis chainMom's spaghetti moment: Let's check that accessibility! The opacity value of 0.25 for disabled labels might make the text too faint. We should verify that this meets WCAG contrast requirements. Let's check if this opacity value is consistent with other disabled states: Consider:
🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Search for other opacity values used for disabled states
rg -g '*.{jsx,js,css}' 'opacity:'
Length of output: 4111 |
||
}} | ||
/> | ||
); | ||
|
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.
🛠️ Refactor suggestion
Yo! These sizes should drop into the theme system, dawg!
Moving the size definitions to the theme would make the component more maintainable and consistent with the design system. This would allow for:
Consider moving these sizes to the theme like this: