em to pt conversion for color contrast check
- Dominant language
- JavaScript
- Stars
- 98
- Forks
- 29
- PR merge metrics
- No merged PRs in 30d
Description
Transformation of font size from ems to points when calculating contrast ratio _could_ be (but does not have to be) made more "ebookish". The current implementation uses the web standard of 1em=16px=12pt.
The problem is determining the correct transformation size so that if text is set so small that it will never hit 18pt, so does need the 4.5:1 contrast ratio. Lighthouse seems to use a different conversion formula, since a file that passes that test fails the ace check. Example file attached, but the relevant attributes are below:
background color: #f15e2b
text color: #ffffff
font size: .9em
The following success technique would suggest that the ability to easily resize the font within a reading system is sufficient to meet SC 1.4.3 with a 3:1 contrast ratio at 1em. ace-core is currently requiring a ratio of 4.5:1 for text this size.
[G174: Providing a control with a sufficient contrast ratio that allows users to switch to a presentation that uses sufficient contrast](https://www.w3.org/TR/2016/NOTE-WCAG20-TECHS-20161007/G174)
[color_lightouse_pass.epub.zip](https://github.com/daisy/ace/files/1454874/color_lightouse_pass.epub.zip)
Contributor guide
Assessment
This issue has not been assessed yet.