-
Notifications
You must be signed in to change notification settings - Fork 18
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
Webapp > Help > Text size understanding : comments on pt => px conversion #136
Comments
Thanks @ArnaudDelafosse for your clever feedback! This note wasn't present at the time of the doc writing. I just grep'd some git logs and found it was introduced on May 23, 2016. Would you feel comfortable with fixing the doc ? |
You're welcome, glad to bring a bit of help to this great tool. |
files impacted:
|
Once the suggestions I made for the Howto page are validated or not, I'll mirror that on the 2 remaining files. |
see #136 Webapp > Help > Text size understanding : comments on pt => px conversion
see Asqatasun#136 Webapp > Help > Text size understanding : comments on pt => px conversion
Thanks @ArnaudDelafosse for your contributing!
#142 is now merged in develop branch. |
see Asqatasun#136 Webapp > Help > Text size understanding : comments on pt => px conversion
see #136 Webapp > Help > Text size understanding : comments on pt => px conversion
…e understanding")
---------------------- set version to 0.9.0 Updated i18n files (add "nav.language" and "nav.language-switching") Spanish i18n file: added some "lang=en" attributs Spanish i18n file: fixed pt => px conversion Add Spanish i18n file Update i18files #136 - Webapp: fixed pt => px conversion ("Help" > "Text size understanding") webapp i18n - Languages switch: added spanish language Webapp - Hidding current contrast on default page DOC - Howto-use.md / Update for the pt => px conversion section Added missing files Fixed #148 - Contrast calculation is visible without scrolling Added getConstrastRatio2DigitRound() method to engine/utils/(...)/ContrastChecker.java updated i18n files for #148 Updated i18n files set version to 0.8.7-SNAPSHOT
Observed behaviour
In the "Help" > "Minimum ratio" > " Level AA" and "Text size understanding" sections, it is implied that 14pt is equivalent to 14px and that 18pt is equivalent to 18px.
Expected behaviour
I believe this is incorrect if you follow the W3C's own "Contrast (Minimum) Understanding SC 1.4.3" in the "Note 1" section where it says "The ratio between sizes in points and CSS pixels is 1pt = 1.333px, therefore 14pt and 18pt are equivalent to approximately 18.5px and 24px."
What I understand is that for a given standard font-size where
body { font-size: 100%; } p { font-size: 1rem; }
sets your paragraphs a font-size of (equivalent to) 16px, contrast ratios for level AA should be at least:/!\ Reminder: do not use px to set your font sizes, these are pixel equivalences. Always use relative units like rem, em or %.
Steps to reproduce the behaviour
See this example on CodePen: https://codepen.io/ArnzWeb/full/WMdmGB/ (it's in French and I've voluntarily rounded 18.5 to 19px).
The text was updated successfully, but these errors were encountered: