Skip to content
Skillpedia
Websites & UI (frontend)75k · #2908

keyboard-navigation

What it does

This skill checks that all interactive parts of a page work with the Tab key and that focus moves in a sensible order. It is for developers and designers who want accessible sites.

When to use it

  • ✓When a button or link cannot be reached with the Tab key.
  • ✓When hidden content can still receive keyboard focus.
  • ✓When a keyboard user gets stuck inside part of the page.

Skill link

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/keyboard-navigation/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/keyboard-navigation/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“Can you check that every control on my site works with only the keyboard?”

5 new skills a week. 1 minute to read.

How it works

The agent tests the tab order, checks that hidden elements are removed from focus, and looks for traps. It suggests DOM order fixes and tabindex settings where needed.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Enable keyboard navigation for all elements

15% of users rely on keyboard navigation—broken focus order or keyboard traps make your site completely unusable for them.

Quick Reference

  • All interactive elements must be reachable via Tab key
  • Focus order should follow visual reading order (left-to-right, top-to-bottom)
  • Never use positive tabindex values—they break natural flow
  • Hidden content must be removed from tab sequence with tabindex='-1'
  • Keyboard traps are only acceptable inside active modals with a working Escape path

Check

Test that all interactive elements are keyboard accessible, focus order matches visual/reading order, hidden content is not focusable, and no keyboard traps exist except in modals with proper escape handling.

Fix

Ensure tab order follows DOM order matching visual layout. Use tabindex='-1' to remove hidden elements from focus. Avoid positive tabindex values. Ensure off-screen or display:none content cannot receive focus.

Explain

Explain how logical focus order helps keyboard users navigate efficiently, why hidden elements must be removed from the tab sequence to avoid confusion, and how focus management affects users of screen readers and switch devices.

Code Review

Review the rendered markup and interactive states that affect Enable keyboard navigation for all elements. Flag exact elements, roles, labels, focus behavior, or keyboard interactions that violate the rule, and note how to verify the fix with browser accessibility tooling or assistive tech.


For full implementation details, code examples, and framework-specific guidance, see references/rule.md.

Rule page: https://frontendchecklist.io/rules/accessibility/keyboard-navigation

FAQ

Why does keyboard access matter?

The skill says many users rely on the keyboard, including people with motor disabilities and screen reader users.

When is a keyboard trap acceptable?

The skill says only inside an active modal that has a working Escape path.

Should positive tabindex values be used?

The skill says no, since positive values break the natural flow.

Details

Original description by the author

Use when reviewing rendered HTML, interactive components, or design-system patterns related to Enable keyboard navigation for all elements. Check native semantics first, then inspect keyboard behavior, focus flow, accessible names, and screen-reader output where relevant.

repo: thedaviddias/Front-End-Checklist

Popularity

GitHub stars
75k
Ranking position
#2908
License
MIT
Updated
10/31/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills