fix(help): accessible colors for help text statuses#240
Conversation
Test summaryRun details
View run in Cypress Dashboard ➡️ This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
Would it be harmful if we just update the theme values to the colors with the proper contrast? It might not strictly be necessary everywhere, but if it's not harmful that seems like the easiest solution to me. What do you think @cooper-joe? |
This is certainly simpler yes, though I think that this might causes headaches for people using those I am leaning towards having two theme values: |
Yeah tricky. On the one hand ensuring good contrast without the developers having to pay too much attention to it would be nice. On the other hand, it's difficult for us to predict all usecases.
I can see the use of that, but then again, at that point they would just be aliases of yellow900 to yellow050, etc, right? I think I'd be fine with just having the colors (yellow, blue, red, etc.). It's well established what colors we use where, so dropping the warning, error, info colors seems likea good solution to me 👍 |
|
Oh wait. I see now that you didn't want to drop them entirely. In that case it does introduce some inconsistencies. Like as a developer, would it be obvious to you why we're using the error color for the error, but the yellow and blue for the other states? Do we add comments everywhere where we're not using the error, warning, info color aliases that this is for contrast? I'm fine with this particular change, but maybe we should think about a nice generic way to approach this elsewhere? Maybe the design repo? |
ghost
left a comment
There was a problem hiding this comment.
I'm ok with these changes 👍. @dhis2/team-apps anyone have any strong feelings against?
ghost
left a comment
There was a problem hiding this comment.
@cooper-joe This is fine to merge I think. Unless there's something that still needs to be done that I'm not aware of?
a5c551f to
fd63bc0
Compare
|
🎉 This PR is included in version 6.5.2 🎉 The release is available on:
Your semantic-release bot 📦🚀 |
This PR changes the color of
warningandvalidvariations of thehelpcomponent. The previous colors were not AA accessible.I have replaced
theme.validandtheme.warningwith the color variables because the theme values are used elsewhere where the contrast requirements are not as strict. I contemplated addingtheme.warning-darkandtheme.valid-dark, but I thought that was over-engineering this. I am open to feedback if that would indeed be a better solution. Perhapstheme.warning-textmight be a useful addition?