Re: 1.4.12 text spacing

On 27/09/2022 13:48, Jonathan Avila wrote:
> There are some ACT rules around this that seem to indicate use of !important in CSS is a failure.    https://www.w3.org/WAI/standards-guidelines/act/rules/24afc2/

I'd caution here that that ACT rule is specifically about inline styles 
(e.g. <p style="line-height: 1 !important">) which have the highest 
possible specificity that can't be overridden. Not applicable to 
"!important" use in general.

Personally, I'm in two minds about even that ACT rule. As we tried to 
tease out in the Author Responsibility part of 
https://www.w3.org/WAI/WCAG21/Understanding/text-spacing.html, it's not 
necessarily a pass/fail depending on whether or not the tool the user 
uses is able to actually change the metrics or not. Even in the case of 
inline styles with "!important", a tool may well be able to go through 
the DOM, find all instances of inline style attributes, and remove any 
styles that cause issues. It's achievable (though requires JS). The fact 
that currently bookmarklets etc don't do that is possibly beside the 
point, as the SC doesn't hinge on whether or not users are actually able 
to do it, but only that IF they manage to set the text metrics, things 
don't break.

Possibly contentious...

P
-- 
Patrick H. Lauke

https://www.splintered.co.uk/ | https://github.com/patrickhlauke
https://flickr.com/photos/redux/ | https://www.deviantart.com/redux
twitter: @patrick_h_lauke | skype: patrick_h_lauke

Received on Wednesday, 28 September 2022 08:49:56 UTC