RE: Testing practice for

We were discussing this on the W3C GitHub a couple of days ago, and it’s more complex than you might imagine.
https://github.com/w3c/wcag/issues/4157


At the time I was testing a website that set the font size in a similar way to yours, which means the base font size is different at every viewport width and hence at every browser zoom level.

Until that discussion, I had been viewing the computed base font size in the DOM Inspector, then increasing the browser zoom until the product of the new base font size and the zoom level was at least twice the original base font size. It’s a real pain to do that because in principle you need to do it for each different piece of text because they may not scale by the same proportion (or at all, as was the case with some text on my website).

And then it got worse. It turns out that the CSS “zoom” and “transform:scale()” properties change the rendered font size without changing the computed base font size, so you have to check their values at 100% zoom and at subsequent levels (in case they change) and factor that into the previous calculation.

I am working on a bookmarklet that will do the calculations for all the text on a page, so you can see what has changed size and by how much at each zoom level. Unfortunately, there’s no way to just measure the rendered font height, so I am hoping there are no other CSS properties or other weird technologies (anyone remember SIFR?) that might affect the rendered font size.

Steve Green
Managing Director
Test Partners Ltd

From: Marc Haunschild <marc.haunschild@accessibility.consulting>
Sent: 05 December 2024 13:51
To: WAI Interest Group discussion list <w3c-wai-ig@w3.org>
Subject: Testing practice for

Hi all,


Does anybody has a suggestion how to test 1.4.4 Resize Text when the font-size is defined by something like this (extracted from a tailwind css project):


.text-copy-md {
 font-size:clamp(16px,calc(16px + (20 - 16) * ((100vw - 1024px) / (1920 - 1024))),20px);
}

Is there maybe a browser plugin that shows me when I resized the text up to 200% of the original size?

--
Mit freundlichen Grüßen

Marc Haunschild - he / him - #gernPerDu
Qualifizierte und autorisierte Prüfstelle im BIK-BITV-Prüfverbund

Marc Haunschild Accessibility Consulting
Sonnenhof 32
53119 Bonn

Telefon: 0170 8 64 00 63
Web: https://Accessibility.Consulting https://haunschild.de

Email: Marc.Haunschild@Accessibility.Consulting<mailto:Marc.Haunschild@Accessibility.Consulting>

Received on Thursday, 5 December 2024 15:18:24 UTC