Telerik blogs

Accessibility tools check if the page elements are focusable. But can the users pass though those pages with a keyboard? Keylens tests exactly that.

I’ve been working on accessible design systems for the past couple of years, and one thing has been bothering me for a long time: a page can pass every accessibility tool check and still have a broken keyboard navigation.

We had a situation where we developed a webpage that passed every static check from AXE. Nothing in the report seemed suspicious. Markup passed, every control had a label, contrast passed, all checks were green.

But when we started using the site, we saw that the Tab navigation was stuck between a date picker and a button and never came out.

That gap is not a bug in the tools. Static analysis asks whether output HTML is valid, and they do that job perfectly. But there is an uncovered use case left: a keyboard user trying to get through the start of the page to the end.

We built Keylens to cover this gap.

Keylens is a free, open-source tool that launches a real browser, tabs through the selected page and reports the user’s keyboard path. Keylens is not a replacement for static analysis tools. It’s an addition to the arsenal that covers the user’s tab journey. Every error it reports answers a question about the user’s keyboard navigation experience, the kind every developer building page navigation should be asking.

In this article, we will go through those questions and see how Keylens answers them. We will find out how to run Keylens from a CI (continuous integration) and show methods of agentically integrating it.

6 Keyboard Navigation Questions Developers Should Ask

Here are the points I usually start with, and what Keylens does about each.

Can a User Move Forward?

This one feels like a trap. An embedded widget like a date picker can swallow Tab and leave you cycling through the same few controls forever.

Keylens catches when focus loops back and forth, and never escapes.

Can a User Reach Everything?

Keylens compares the interactive elements on the page with the ones Tab visited and lists the gaps for unreachable elements. Tabs and menus that promise arrow-key navigation through roving tabindex get a separate check, so you hear about it when some of their items can’t be reached.

Is the Order Correct?

People notice this one only when it’s wrong. Tabbing should roughly follow the page, but a positive tabindex or a rearranged layout can send focus jumping around.

Keylens compares the Tab order with the DOM order and flags unusual shifts.

Can a User See Where They Are?

Reaching an element is no use if there is no sign of where the focus is. Keylens checks whether a focus causes a visible change, and that the focused element itself isn’t sitting under a sticky header or a banner.

Can a User Skip the Repetition?

Forty navigation links on every page is a lot of Tab presses. Keylens looks for a skip link, presses Enter and checks that focus really lands in the main content. A link that goes nowhere doesn’t count.

Does Focus Survive a User’s Actions?

This is the hardest one to predict. You press a button, the content re-renders, and the focus jumps back to the top of the document. With an opt-in flag, Keylens activates elements and checks where the focus ends up.

Those questions have materialized as rules in Keylens, and every report of the tool answers them. Each rule maps to the WCAG success criteria, so findings are easy to trace back to the guidelines. You can browse them all in the rules reference.

Keylens Under the Hood

Keylens opens a webpage with Playwright in Chromium, Firefox or WebKit and dismisses cookie banners first, so consent popups don’t drown out real findings.

Then it presses Tab, over and over, recording each focused element’s selector, role, accessible name and position, plus a snapshot of its focused and unfocused styles. This information is then passed to rules that determine whether there is an error or not.

For example, Keylens sees whether focus indicators can be visually perceived by comparing focused and unfocused styles first, then confirms with a screenshot diff between the two states.

For components such as tabs, menus, and listboxes Keylens uses keyboard arrow keys to validate whether roving tabindex is working properly.

Keylens HTML focus-order map on a sample page: numbered Tab stops connected by dashed lines

How to Try Keylens

To try Keylens, you need Node.js 22 or later. Install it, then download the browser Playwright will use:

npm install --save-dev @progress/keylens
npx playwright install chromium

Then run the audit command with the URL of the page you want to check, and choose the output formats you need:

npx @progress/keylens audit https://your-site.example --output cli,json,html,markdown

Keylens can report in the terminal, as JSON, Markdown or as HTML. The HTML output is also an interactive report, which shows the result as a numbered markers for the real Tab sequence, dashed lines between stops and red markers where something is wrong. It also displays a summary of all failed and passed Rules.

Keylens HTML report: the Rules section showing passed rules and the details of an unreachable element

Built for CI and AI Agents

Keyboard problems rarely show up on the day they are introduced. Someone adds a modal, someone else reorders a menu, and three weeks later a user can’t get past the header. Nobody tabs through the whole site after every pull request, and nobody should have to.

That’s where CI helps. Run Keylens on every pull request, and it does the tabbing for you, so a broken keyboard path is caught before the code is merged. Fixing it then takes minutes instead of a support ticket.

Keylens is also ready for AI coding assistants. It ships an MCP server, so an assistant can run an audit and ask for guidance on any rule.

It also includes an agent skill with a short set of instructions that teaches the assistant how to run an audit, read the results and apply the right fix for each kind of problem. Together, they let an assistant audit a page, fix what it finds and run the audit again to check the fix.

What It Doesn’t Do Yet

Keylens records one page state, the one you get after the page loads. So a modal that opens on a click isn’t crawled unless you point Keylens at a URL or a fixture where it’s already open. It doesn’t look inside iframes or shadow DOM, so those need their own audit.

And Keylens gives you evidence from one automated keyboard path, so it doesn’t replace trying the page yourself with a keyboard.

The limitations guide has the full list.

Give It a Try

A passing static audit tells you the markup is sound, not that a keyboard user can get through the page. Keylens presses Tab in a real browser, reports where the journey breaks, and plugs into CI and AI assistants so you can catch those problems early.

The source is on GitHub and the guides are in the documentation.

Give it a try on a page you think is working well and let Keylens do its magic. If it reports any issues back, we would love to hear about it.

Happy Keylensing!


Zhuliyan Penkov
About the Author

Zhuliyan Penkov

Zhuliyan is a Software Engineer in the Design Engineering team at Progress, where he creates and maintains accessible design systems and helps lay the foundational principles behind the Kendo UI components. He builds AI workflows that improve how teams design, test and ship UI. His work centers on scalable component theming with user-centered design.

Related Posts

Comments

Comments are disabled in preview mode.