Closed HundredVisionsGuy closed 2 weeks ago
Issues remaining:
is_bold
to any heading or element with a font-weight set to bold or 700 or greateris_bold
set to True
also has descendents set to True
unless directly targetted.All color tools related to alpha blending and gradients are in place. We just need to integrate them into the cascade tool..
On the bold front (see first check box above), it turns out that most browsers will compute the font-weight to 700. According to the WebAIM: Contrast Checker,
In CSS, bold text typically has font-weight:bold, or font-weight:700 or greater.
Next steps: Add a check for bold or not and apply to inheritance using these steps:
h1-h6
or a b
or strong
tag, set is_bold
to True
b
or strong
element, set is_bold
to True
is_bold
to True
and apply to descendantsis_bold
to False
and apply same to descendants
When determining whether an element meets the color contrast goals as defined in the WebAim Contrast Checker, we need to only measure a goal based on whether the element in the context of the browser (having styles applied or not) as well as whether we wish to meet it at a
AA
orAAA
level.According to the WebAim Contrast Checker website,
By default, the base font-size is 16px. In order for a
p
or anything other than anh1
-h3
tag to be considered large, it would have to be enlarged by 150%. There are some different ways it could be applied.Since all
h
tags are by default bold, without any size adjustment, onlyh1
,h2
, andh3
tags are bold and large enough to qualify as large in size (NOTE: theh3
tag by default is 18.72px in size).My suggestion is to add to the cascade_tools'
CSSAppliedTree
a search for any changes to file size as well as what the computed size should be (this would be fun considering the cascade and inheritance). Here are my initial thoughts:root_font_size
for all elements except the header.NOTES about
em
vrem
values:em
is relative to its parent's computed sizerem
is always relative to the base font-size of a document (16px)