-
-
Notifications
You must be signed in to change notification settings - Fork 729
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
Updating form field borders for better contrast #13131
base: master
Are you sure you want to change the base?
Updating form field borders for better contrast #13131
Conversation
1. Border colour did not have sufficient contrast. New contrast ratio passes WCAG AA for Graphical Objects and user interface components. 2. New border variable to aid consistency and future maintanance.
Inputs include custom made ones such as tags, select2s and tom selects. Some border radii were using mixins but not utilising it, hence they are now variables.
Niiiiiice 😍 |
Tags' rules are still coming from the old admin styles hence had to add the new (admin_v3) border variable to the old one. Has a hard coded colour value of #2e3132 as it has no access to the new colours.
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, thanks for working through this task! Code changes look good to me.
Personally, I find the borders look too dark, and make the screen very busy. So I had a look at the accessibility checker and found that the minimum contrast required for input borders was 3:1 (#2E3132). Maybe that would look better? Although the example given has a 2px border, while we use a 1px border.
In short, I'm not an expert and so will seek more feedback from testers!
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.
Thanks @krisztin 🙏
The screen is very busy. But I don't think that "hiding" the important input fields is the solution. I find this new version much clearer and I think that it's just a matter of getting used to the new borders. I reckon that ten years ago there was a trend to make things more smooth, rounded, blending in and beautiful. But now people are actually figuring out that harsh contrast has its benefit, too. It may not look as beautiful but it's more practical. |
@dacook I've used #2E3132 because that was the only shade of grey(black) in the current palette that passed contrast requirements. Also, it's generally not a good idea to keep introducing new colours as they:
One thing to note is that we are a bunch of relatively young people here who still have good enough sight (hopefully) and hence could have a preference for more "smooth" designs. In your 40s your presbyopia (age related eye sight decline) will really kick into gear at which point you'll be happy for some contrast on the internet 😅️ |
What? Why?
Closes: #12846
Border colours on forms did not have sufficient contrast. New contrast ratio using
$dark-grey #2E3132
passes WCAG AA for user interface components.Note: on top of the border change I've refactored (adjusted) a few of the inputs as with the new border it was obvious there were some size and border radius differences.
Screenshots of the new UI on this branch
Inputs and tomselects
![Inputs and Tomselects](https://private-user-images.githubusercontent.com/37115012/411022981-6beec85a-c9d3-4981-b569-fafecee2dca1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0MjIzODYsIm5iZiI6MTczOTQyMjA4NiwicGF0aCI6Ii8zNzExNTAxMi80MTEwMjI5ODEtNmJlZWM4NWEtYzlkMy00OTgxLWI1NjktZmFmZWNlZTJkY2ExLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEzVDA0NDgwNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWFjNTM4MDRlZDZkNmRjODU3MDY0MDZkZWRkYTFlOTkzMDM3NGYzZDU5M2Q1MzA4NGY3NGJjNGI0ZDliYmI2NzImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.pmoArdzZ7oZjay7m1Km2etWXTqSAVluihxTmYRiyUnM)
Select2
![ofn_select2](https://private-user-images.githubusercontent.com/37115012/411023673-c7e59ec4-ffc2-401a-ac71-cac3b48e5c94.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0MjIzODYsIm5iZiI6MTczOTQyMjA4NiwicGF0aCI6Ii8zNzExNTAxMi80MTEwMjM2NzMtYzdlNTllYzQtZmZjMi00MDFhLWFjNzEtY2FjM2I0OGU1Yzk0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEzVDA0NDgwNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWJmMzRmYWI2M2JkMjBhMzlmOGVjMzVlYmU5YWRlNDJhNzIxZTY5MzQwY2JlOTdjMmQyMTdjNWI3OWQ2NmUzOWYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.Sf8zFfiFkqPCnI9cwJdFtqq7ZX8opojttSysGH6SF44)
Tags
![ofn_tags](https://private-user-images.githubusercontent.com/37115012/411023482-b5f2f449-b345-460a-98b6-906e5184ec42.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0MjIzODYsIm5iZiI6MTczOTQyMjA4NiwicGF0aCI6Ii8zNzExNTAxMi80MTEwMjM0ODItYjVmMmY0NDktYjM0NS00NjBhLTk4YjYtOTA2ZTUxODRlYzQyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEzVDA0NDgwNlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWMwN2IzNWFlNTA3ZTA4MTI3YTg2MTI2NjQxYTRlMTZmN2FiZDI2ZDA2YTRhYmM1OThlNzlhZmU2MzViY2ExZDUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.VRoHU02Anh_a-ybfDnn6wXvnS-1LgnohXQ_kBQSzidE)
What should we test?
textarea
under /admin/general_settings/editRelease notes
Changelog Category (reviewers may add a label for the release notes):
Documentation updates
Form related content does not seem to exist on the Wiki. Suggest adding a wiki entry under Design for Design styleguide: forms