Skip to main content
Glama

a11y_keyboard

Detect keyboard traps by walking real Tab stops in Chromium and checking whether Escape releases a cycle. Reports trapped focus and returns the tab stop list.

Instructions

Keyboard-trap detection (2.1.2) with REAL Tab walking in Chromium: up to 60 real tab stops, cycle detection (the modal pattern), then the decisive test — does ESCAPE release the cycle? A modal that cycles and releases on Escape is correct and NOT reported; a cycle Escape cannot leave is a trap (high severity). Returns the full tab stop list too. Requires local Playwright.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYes
langNo
max_pasosNomax real Tab presses (60 default)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv3.3.0

TDQS

A4.1/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden and does so: up to 60 real tab stops, cycle detection logic, the Escape-release decision rule, severity classification, and the environment prerequisite ('Requires local Playwright'). It also notes it returns the full tab stop list, covering return behavior in the absence of an output schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loads the criterion and core mechanism, then layers the decision rule. Dense but each clause (Escape test, severity, Playwright requirement, return value) earns its place; slightly long with the mid-sentence em-dash asides.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema and no annotations, so the description must cover results and safety/context — it names the returned tab stop list and the local-Playwright requirement, which is substantial. The lang parameter's effect and the shape of severity output remain unstated, leaving a modest gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is only 33%: url and lang have no schema descriptions, and the description never explains what lang (es/en) controls or what url should point to. It tangentially touches max_pasos via 'up to 60 real tab stops,' but that default is already documented in the schema, so it adds little and leaves two parameters unexplained.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource: keyboard-trap detection for WCAG criterion 2.1.2 via real Tab walking in Chromium. The scope ('cycle detection... does ESCAPE release the cycle?') distinguishes it clearly from sibling tools like a11y_audit_url or a11y_audit_dom, which are broader audits.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives strong context on when it fires and how results are judged: a modal that cycles and releases on Escape is correct and NOT reported, while an unescapable cycle is high severity. It implies the target scenario (modal/dialog keyboard behavior) but never explicitly names when to prefer siblings like a11y_audit_url over this narrow check.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.