Menu

I pressed Tab through all 5,495 stops on our site: the order is perfect and 373 of them show no focus ring
📰

I pressed Tab through all 5,495 stops on our site: the order is perfect and 373 of them show no focus ring

DEV Community: css·Daniel Pertu·1 day ago
#a23DYHZm
#devtocss#devto#dev#outline#none
Reading 0:00
15s threshold

I have grepped our 76 public pages for accessibility before and found one h1 each, zero skip links and a toast region on every marketing page. A grep tells you what is in the HTML. It does not tell you what happens when somebody actually presses Tab, so this time I pressed Tab.

const tab = async ( ) => { await page . cdp ( "Input.dispatchKeyEvent" , { type : "rawKeyDown" , windowsVirtualKeyCode : 9 , key : "Tab" , code : "Tab" } ) ; await page . cdp ( "Input.dispatchKeyEvent" , { type : "keyUp" , windowsVirtualKeyCode : 9 , key : "Tab" , code : "Tab" } ) ; } ;

Enter fullscreen mode

Exit fullscreen mode

Worth knowing: CDP key events do move focus. They do not scroll. An earlier audit of mine tried to test arrow-key scrolling this way and window.scrollY never moved, so I assumed synthetic keys were useless for keyboard work.…

Continue reading — create a free account

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