keyboard-interface

Designs keyboard interaction models for composite widgets, overlays, and focus management in web interfaces.

1|Updated Sep 11, 2026
One-click install
npx skills add https://github.com/rebuildup/my-web-2026 --skill keyboard-interface-rebuildup
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: keyboard-interface
Source: https://github.com/rebuildup/my-web-2026/tree/main/skills/keyboard-interface
Command: npx skills add https://github.com/rebuildup/my-web-2026 --skill keyboard-interface-rebuildup

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Custom web interfaces often break keyboard usability: every element becomes a tab stop, focus gets lost in dialogs, or shortcuts conflict with typing. This Skill provides a structured method to design predictable keyboard interaction models so users can complete tasks without a pointer. ## Core Features & Use Cases - Composite Widget Navigation: Defines roving tabindex or aria-activedescendant strategies for tabs, menus, listboxes, trees, grids, and toolbars. - Overlay Focus Lifecycle: Specifies focus entry, containment, dismissal, and restoration for dialogs, popovers, and menus. - Shortcut Policy: Evaluates custom keyboard shortcuts for conflicts with text entry, browser commands, and assistive technology. - Use Case: When building a custom dropdown menu in a React app, use this Skill to decide that the menu gets one tab stop, arrow keys move between items, Escape closes it, and focus returns to the trigger button. ## Quick Start Use the keyboard-interface skill to design the keyboard navigation model for my custom tabs component with proper focus management.

Frequently Asked Questions about keyboard-interface

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement keyboard navigation for a custom dropdown menu?

Give the menu one page-level tab stop, use arrow keys to move between items internally, and choose either roving tabindex or aria-activedescendant as the focus strategy. Escape should close the menu and return focus to the trigger element.

What is the difference between roving tabindex and aria-activedescendant?

Roving tabindex moves actual DOM focus among child elements, keeping one child at tabindex 0 and others at -1. With aria-activedescendant, DOM focus stays on the container while an attribute tracks the active item. Choose one strategy per composite widget and do not mix them.

Should every interactive element be in the tab order?

No. Tab should move between meaningful components, while composite widgets like menus, toolbars, and grids use arrow keys for internal navigation. Making every child a tab stop creates excessive stops and an unpredictable interaction model.

How do I manage focus when a dialog opens and closes?

Define the full lifecycle: set initial focus when the dialog opens, contain focus inside while it is modal, provide a keyboard dismissal path such as Escape, and restore focus to the invoking element when it closes. Never drop focus onto the body element.

When should I avoid adding custom keyboard shortcuts?

Avoid shortcuts that conflict with browser, OS, or assistive-technology commands, fire while the user types in text fields, or use single printable characters that trigger unexpectedly. Never require an undocumented shortcut to access essential functionality.