Skip to content

Add accessible pattern references to agent skill #118

@dylan-isaac

Description

@dylan-isaac

Problem

Arrow's agent skill provides excellent guidance for reactivity, templates, and components — but when agents generate interactive widgets (accordions, tabs, dialogs, etc.), accessibility is inconsistent. The current examples demonstrate this:

Component What's Present What's Missing
Tabs role="tablist", aria-selected, aria-controls Arrow key navigation between tabs
Accordion Basic button + content structure aria-expanded, aria-controls, heading wrapper, role="region"
Table Sortable via buttons Not a <table> — no grid semantics, no aria-sort
Gallery Buttons with images Empty alt, no accessible names, no focus trap in lightbox

This isn't an Arrow problem — it's a training data problem. Agents reproduce whatever patterns they've seen, and accessible implementations are underrepresented. The skill is the right place to fix this.

Proposal

Add a references/patterns/ directory to the skill containing accessible pattern documentation for common widgets. Each pattern doc would include:

  1. Quick Implementation — Minimal accessible Arrow example (what agents copy most)
  2. Required/Recommended ARIA — Tables of attributes, easy to verify
  3. Keyboard Interaction — Required and optional key behaviors
  4. Variants — Common variations (e.g., single-expand accordion)
  5. Common Mistakes — What to avoid
  6. APG Reference — Link to W3C source

These docs would be based on the W3C ARIA Authoring Practices Guide but translated into idiomatic Arrow code.

Integration

Update SKILL.md to reference the patterns:

## Quick workflow

2. Read the smallest relevant reference:
   - Getting started / scaffold shape: `references/getting-started.md`
   - API surface and package split: `references/api.md`
   - Common patterns and examples: `references/examples.md`
   - Accessible widget patterns: `references/patterns/` (accordion, tabs, dialog, etc.)

Add a rule of thumb:

- When building interactive widgets (accordion, tabs, dialog, disclosure, menu),
  read the matching pattern in `references/patterns/` for required ARIA and keyboard interactions.

Priority Patterns

Based on existing examples and common agent requests:

  • Accordion — Fix current example
  • Tabs — Add missing keyboard nav
  • Dialog — Not currently in examples, frequently requested
  • Disclosure — Simple show/hide toggle
  • Menu Button — Dropdown menus

Why This Matters

Arrow is positioning itself as "the first UI framework for the agentic era." Accessibility is a differentiator here — most agent-generated UIs are inaccessible because agents guess from training data. Encoding accessible patterns directly in the skill means Arrow agents produce accessible output by default.

This also aligns with the sandbox use case. If agents are generating UIs for end users in chat interfaces, those UIs need to be usable by everyone.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions