Two Pixels Short on the Laptop
The first time I ran the accounting game’s phone-journey suite somewhere other than the always-on box, it came back 1,207 passed and 9 failed, at both screen widths. All nine failures were one finding about one link: the sentence at the end of a session that tells you what is next, measuring 266 by 42 pixels.
The rule it broke is mine. Every tappable thing has to be at least 44 by 44, because thumbs. A link inside a sentence is exempt, as the accessibility guidelines allow: you cannot make prose 44 pixels tall. The harness decides which links are inside a sentence by comparing the link’s text to its paragraph’s text. If the paragraph is longer, the link is inline, and exempt.
On the laptop that comparison said the link was the whole paragraph, so it was a button, and a button two pixels too short.
The cause was in the harness. To keep its reports readable, it cut every text to a 48-character snippet, and then did the comparison on the snippets. Any link longer than about 46 characters filled its snippet just as completely as its paragraph did. They came out the same length, and the exemption was gone. That bug had been in the suite on the box from the day it was written.
The box had never failed it because its fonts are wider. There, the same link wrapped onto three lines, and three lines of text are comfortably taller than 44 pixels. So the box checked a sentence link as if it were a button, found a button of perfectly respectable size, and passed it. The laptop’s fonts set the same words on two lines, 42 pixels tall, and failed it for the same wrong reason. Neither machine ever asked the right question. One of them was just luckier with the answer.
The fix compares whole texts, and both widths now pass 1,216 of 1,216 on both machines. The same run turned up a second font effect while it was there. The prose measure was set in ch, a unit defined by the width of the font’s zero, and the laptop’s fonts fit more letters to a zero. Lines meant to stay under 90 characters were running 91 to 99. The measure is now 60ch, which holds under 90 in either family.
Neither change touched the game. Both were about what the suite had been measuring all along: the layout, the harness, and which fonts happened to be installed on the machine it ran on.