keyboard-focus
Skill11 starsChanged 11 days agoMITView on GitHub
Use when implementing or reviewing keyboard navigation, focus visibility, dialogs, menus, composite widgets, focus order, and keyboard interaction patterns.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- AdilSiddiquiHQ/a11y-skillstheir own version, first seen Nov 16, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- AdilSiddiquiHQ/a11y-skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository46 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- accessibility-automationSkill
- accessibility-reviewSkill
- accessible-componentsSkill
- accessible-motionSkill
- animation-performanceSkill
- anti-slop-uiSkill
- api-securitySkill
- authentication-sessionsSkill
- authorization-access-controlSkill
- component-engineeringSkill
- core-web-vitalsSkill
- design-directionSkill
- design-system-architectureSkill
- document-head-seoSkill
- font-performanceSkill
- forms-and-validationSkill
- frontend-architectureSkill
- gsap-fundamentalsSkill
- icon-engineeringSkill
- image-asset-optimizationSkill
- independent-reviewSkill
- interactive-storytellingSkill
- javascript-performanceSkill
- modern-cssSkill
- motion-design-systemsSkill
- network-cachingSkill
- performance-auditingSkill
- performance-testingSkill
- premium-landing-pagesSkill
- quickstart-onboardingSkill
- rendering-performanceSkill
- responsive-engineeringSkill
- screen-reader-testingSkill
- scrolltrigger-experiencesSkill
- secrets-configurationSkill
- secure-application-designSkill
- secure-input-outputSkill
- security-reviewSkill
- security-testingSkill
- semantic-accessibilitySkill
- visual-design-reviewSkill
- visual-reference-analysisSkill
- wcag-auditingSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
18 rules. About 0 are common, 18 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈18
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
All functionality must be keyboard operable without timing-dependent key sequences.
- Distinctive: line 17
Avoid positive tabindex values.
- Distinctive: line 18
Never create a keyboard trap.
- Distinctive: line 19
Ensure focused content is not obscured by sticky headers, cookie banners, overlays or scroll containers.
- Distinctive: line 25
Use Shift+Tab to verify reverse navigation.
- Distinctive: line 27
Test Escape, arrow keys, Home and End only where the chosen widget pattern defines them.
- Distinctive: line 28
Verify visible focus at all breakpoints, zoom levels and color themes.
- Distinctive: line 30
Test sticky and fixed elements to ensure they do not cover focused controls.
- Distinctive: line 35
Use the WAI-ARIA Authoring Practices Guide pattern for the exact widget before implementing custom keyboard behavior.
- Distinctive: line 37
Prefer native controls. For custom widgets:
- Distinctive: line 39
Keep focus and selected state distinct where the pattern requires it.
- Distinctive: line 40
Keep ARIA state synchronized with actual behavior.
- Distinctive: line 42
Avoid making every child a separate Tab stop when the pattern calls for managed focus.
- Distinctive: line 48
Keep keyboard focus within the modal while it is active.
- Distinctive: line 53
Do not apply modal focus trapping to non-modal dialogs or ordinary popovers.
- Distinctive: line 57
Test with keyboard only, browser zoom, visible focus inspection and at least one representative assistive technology.
- Distinctive: line 61
All controls are reachable and operable, focus is visible and unobscured, custom widgets follow a documented pattern, and focus is restored …
- Distinctive: line 69
Prevention: Prefer native controls, follow the exact WAI-ARIA Authoring Practices pattern for custom widgets, and verify forward/reverse …
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Keyboard and Focus Engineering
Objective
Make every interactive workflow operable with a keyboard, with predictable focus movement and visible focus that is not hidden by sticky or fixed content.
Baseline rules
- All functionality must be keyboard operable without timing-dependent key sequences.
- Preserve a logical focus order that follows the meaning and operation of the interface.
- Provide a clearly visible focus indicator; do not remove outlines without an equally visible replacement.
- Avoid positive tabindex values. Prefer natural DOM order; use tabindex="0" only when a custom non-native control genuinely needs sequential focus.
- Never create a keyboard trap. If a modal intentionally contains focus, provide a keyboard-accessible close path and predictable return.
- Ensure focused content is not obscured by sticky headers, cookie banners, overlays or scroll containers.
- Provide a skip link for repeated navigation where it improves efficient access.
Workflow
- Tab through the page from a fresh load. Record focus order and any unreachable controls.
- Use Shift+Tab to verify reverse navigation.
- Activate links and buttons with Enter and Space according to native semantics.
- Test Escape, arrow keys, Home and End only where the chosen widget pattern defines them.
- Verify visible focus at all breakpoints, zoom levels and color themes.
- Open each dialog or popover, verify initial focus, contained navigation where appropriate, Escape behavior and focus restoration.
- Test sticky and fixed elements to ensure they do not cover focused controls.
- Repeat after validation errors, route changes, dynamic updates and conditional rendering.
Composite widgets
Use the WAI-ARIA Authoring Practices Guide pattern for the exact widget before implementing custom keyboard behavior. Tabs, listboxes, menus, tree views and comboboxes do not share one universal keyboard model.
Prefer native controls. For custom widgets:
- Implement only the documented interaction model.
- Keep focus and selected state distinct where the pattern requires it.
- Keep ARIA state synchronized with actual behavior.
- Support expected keyboard commands and announce changes.
- Avoid making every child a separate Tab stop when the pattern calls for managed focus.
Dialog focus lifecycle
For a modal dialog:
- Move focus into the dialog when it opens, usually to the most appropriate first control or a static heading for complex content.
- Keep keyboard focus within the modal while it is active.
- Make background content inert or otherwise unavailable to interaction.
- Support Escape when dismissal is permitted.
- On close, return focus to the invoking control or a logical fallback if it no longer exists.
Do not apply modal focus trapping to non-modal dialogs or ordinary popovers.
Verification
Test with keyboard only, browser zoom, visible focus inspection and at least one representative assistive technology. Verify focus after every state transition, not only initial page load.
Completion criteria
All controls are reachable and operable, focus is visible and unobscured, custom widgets follow a documented pattern, and focus is restored predictably after transient UI closes.
Common AI failure mode
Failure: An agent makes a custom control look interactive but leaves it unreachable by keyboard, removes the native focus outline, or implements a generic arrow-key model without checking the widget pattern.
Why it matters: Keyboard users can lose access to essential actions, become trapped, or lose track of their position even when the interface appears correct with a mouse.
Prevention: Prefer native controls, follow the exact WAI-ARIA Authoring Practices pattern for custom widgets, and verify forward/reverse Tab order, visible and unobscured focus, documented widget keys, Escape behavior, and focus restoration.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

