Skip to main content
Glama

Validate ARIA in HTML or on a page

check_aria
Read-onlyIdempotent

Validate ARIA attributes and accessible name, role, and value usage in an HTML snippet or live URL to expose accessibility violations on a page or a chosen element.

Instructions

Validate ARIA attribute + accessible name/role/value usage — in an HTML snippet (html) or on a live page (url), optionally limited to one element and its descendants (selector). Runs axe-core cat.aria and cat.name-role-value rules (aria-* attribute correctness, role validity, required parents/children, aria-hidden-focus, accessible names). Returns violations. A selector that matches nothing, or a page that answers an HTTP error, is an error — never "no violations". Nodes cap at 5 per rule by default — every rule reports nodesTotal + truncated; raise nodeLimit (max 50) or use scan_history(id) for the full set.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoLive page to check (pass this or `html`)
htmlNoHTML to test for ARIA correctness (pass this or `url`)
selectorNoOnly report findings on this element and its descendants (e.g. the `selector` from a scan_page issue). ARIA references outside it still resolve.
nodeLimitNoMax nodes returned per rule (default 5, max 50)

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv1.7.0
    • changedInput schema / properties / html / description
      Previous value: -"HTML to test for ARIA correctness"New value: +"HTML to test for ARIA correctness (pass this or `url`)"
    • addedInput schema / properties / nodeLimit
      Added value: +{
      +  "description": "Max nodes returned per rule (default 5, max 50)",
      +  "type": "number"
      +}
    • addedInput schema / properties / selector
      Added value: +{
      +  "description": "Only report findings on this element and its descendants (e.g. the `selector` from a scan_page issue). ARIA references outside it still resolve.",
      +  "type": "string"
      +}
    • addedInput schema / properties / url
      Added value: +{
      +  "description": "Live page to check (pass this or `html`)",
      +  "type": "string"
      +}
    • removedInput schema / required
      Removed value: -[
      -  "html"
      -]
  2. First observedv1.3.1

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already declare read-only, idempotent, non-destructive behavior, and the description adds substantial beyond that: error semantics (a non-matching selector or an HTTP-error page is an error, never 'no violations'), the per-rule node cap of 5 with nodesTotal + truncated flags, the nodeLimit ceiling of 50, and the escape hatch via scan_history. That is exactly the extra context the annotations do not provide.

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?

It is dense and front-loaded, leading with what is validated and which inputs select which mode, then layering error and truncation semantics. The parenthetical rule list and cap details make it a long single paragraph, but nearly every clause carries information an agent needs; only slight compression would help.

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

Completeness5/5

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

There is no output schema, yet the description states what is returned (`violations`), how results can be truncated, and how to retrieve the full set via scan_history. Combined with the error-vs-empty distinction, an agent has everything needed to call and interpret this tool correctly.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3, but the description adds real meaning: the html/url mutual exclusivity with its 'pass this or `html`' framing, the note that ARIA references outside the `selector` still resolve, and the default/max bounds on nodeLimit tied to truncation behavior. It does not add syntax examples or edge-case formats for the string inputs.

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?

The description names a specific verb (validate) plus precise resources (ARIA attribute + accessible name/role/value usage) and the two input modes (html snippet or live url). It also enumerates the underlying axe-core rule categories (cat.aria, cat.name-role-value) so an agent can distinguish it from scan_page, scan_html, and check_color_contrast without opening a schema.

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?

It gives clear context: use with `html` for a snippet or `url` for a live page, optionally narrowed with `selector`, and it names scan_history(id) as the alternative when the truncated node set is insufficient. It does not explicitly say when to prefer this over sibling scanners like scan_html or scan_page, so it stops short of full alternative-routing guidance.

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