Menu

I pressed Tab 35 times on our own page, and one of the 35 focus rings does not exist
📰

I pressed Tab 35 times on our own page, and one of the 35 focus rings does not exist

DEV Community: css·Daniel Pertu·17 days ago
#sHEiIhZs
#devtocss#devto#dev#ring#outline
Long article (1036 words) — no AI summary yet.
Reading 0:00
15s threshold

Take any content page on our marketing site, for example pub-trivia.app/guides/how-to-host-a-pub-quiz , click once in the address bar, and then press Tab repeatedly. There are 35 focusable elements. The 36th press hands focus back to the browser, so there is no trap and no surprise ordering. The surprise is what the ring looks like, which turns out to be three different answers and one non-answer.

We walked the whole order through CDP, reading document.activeElement and its computed outline and box-shadow after each press.

Three treatments and a gap

treatment how the ring is drawn count

outline-style: auto Chrome draws its own ring, we contribute nothing 31

Tailwind ring on box-shadow ours, 2px at rgb(204, 204, 204) 3

nothing at all no outline, no box shadow 1

The 31 are every plain anchor: the wordmark, the four header nav links, the two breadcrumb links, the four related-page cards, and all twenty footer links.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.