Umbraco-CMS
Umbraco-CMS copied to clipboard
Update default greens in variables.less to provide better contrast.
Lighthouse accessibility tool identified the green selected for "Login" (and other) buttons as low-contrast. Change default greens to offer more contrast.
Prerequisites
- [X] I have added steps to test this contribution in the description below
If there's an existing issue for this PR then this fixes 15070
Description
The following changes were made:
- Changed the default green colors in "variables.less" to provide better contrast. This is because Google's lighthouse accessibility tool identified the current green as low-contrast. See below for old green vs. new green.
Old:
New:
To test the changes:
- Open Umbraco without logging in in Chrome (Edge may also work for this)
- From the developer tools, navigate to the "Lighthouse" tab.
- Click "Analyze Page Load" with the "Accessibility" checkbox checked.
- Observe the output. Notice that there are no issues with contrast.
Note: Because this is a variable, other styles that use this green are also affected. This should, in theory, fix any other accessibility issues due to the use of this green.
Hi there @nagolucky18, thank you for this contribution! 👍
While we wait for one of the Core Collaborators team to have a look at your work, we wanted to let you know about that we have a checklist for some of the things we will consider during review:
- It's clear what problem this is solving, there's a connected issue or a description of what the changes do and how to test them
- The automated tests all pass (see "Checks" tab on this PR)
- The level of security for this contribution is the same or improved
- The level of performance for this contribution is the same or improved
- Avoids creating breaking changes; note that behavioral changes might also be perceived as breaking
- If this is a new feature, Umbraco HQ provided guidance on the implementation beforehand
- [x] 💡 The contribution looks original and the contributor is presumably allowed to share it
Don't worry if you got something wrong. We like to think of a pull request as the start of a conversation, we're happy to provide guidance on improving your contribution.
If you realize that you might want to make some changes then you can do that by adding new commits to the branch you created for this work and pushing new commits. They should then automatically show up as updates to this pull request.
Thanks, from your friendly Umbraco GitHub bot 🤖 🙂
Hi @nagolucky18 ,
Thanks for this update.! I'll quickly check with HQ whether the "new greens" are OK for them or not and I'll keep you posted of their answer.
Cheers!
Hi @nagolucky18 ,
Sorry for coming back to you so late 😬 Thanks a lot for your patience!
It seems that HQ updated the colors of their UI Library components to have better contrasts (and they pass the A11Y tests), so they suggest to use the same green(s) as in the UI LIbrary. So it would be super great if you could adapt your change to use one of the UI LIbrary greens. Let me know if you need any help with this and I'll get back to you quicker this time 😁
Cheers!
@mikecp
Hi @nagolucky18 ,
Sorry for coming back to you so late 😬 Thanks a lot for your patience!
It seems that HQ updated the colors of their UI Library components to have better contrasts (and they pass the A11Y tests), so they suggest to use the same green(s) as in the UI LIbrary. So it would be super great if you could adapt your change to use one of the UI LIbrary greens. Let me know if you need any help with this and I'll get back to you quicker this time 😁
Cheers!
No worries! I get it, with the holidays and such. I'm not familiar with the location of the UI Library file(s). Is there a directory you could point me to? Or otherwise a commit or Github item where the update was made? Thanks.
Hi @nagolucky18 ,
The files are in fact located in the Umbraco.UI repository, and I believe that this PR might be the one we're looking for 😁
https://github.com/umbraco/Umbraco.UI/pull/648
I hope this helps, let me know if you need anything else 😉
Cheers and have a good week-end!
@mikecp It looks like the greens in that commit still fail the lighthouse accessibility test from Google. The values in https://github.com/umbraco/Umbraco.UI/pull/648 were selected because they passed A11Y though, so I'll go ahead and push the commit that updates them to closely resemble the new greens if that is OK.