Skip to content
Skillv1.0.0

react-aria

Build accessible UI components with React Aria. Use when creating accessible form controls, implementing ARIA patterns, building design systems, or fixing accessibility issues.

by terminalskills(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from terminalskills/skills (skills/react-aria/SKILL.md). Install upstream with npx skills add terminalskills/skills --skill react-aria. Copyright stays with the author (Apache-2.0).

React Aria

Overview

React Aria (Adobe) provides accessible UI primitives for React. Handles keyboard navigation, screen reader announcements, focus management, and ARIA attributes — you provide styling.

Instructions

Step 1: Accessible Components

import { Button, Label, ListBox, ListBoxItem, Popover, Select, SelectValue } from 'react-aria-components'

export function SelectField({ label, items, onSelectionChange }) {
  return (
    <Select onSelectionChange={onSelectionChange}>
      <Label>{label}</Label>
      <Button><SelectValue /><span aria-hidden="true">▼</span></Button>
      <Popover>
        <ListBox>
          {items.map(item => (
            <ListBoxItem key={item.id} id={item.id}>{item.name}</ListBoxItem>
          ))}
        </ListBox>
      </Popover>
    </Select>
  )
}
// Arrow keys navigate, Enter selects, Escape closes
// Screen reader: announces value, role, option count

Step 2: Focus Management

import { FocusScope } from 'react-aria'

function ModalDialog({ children, onClose }) {
  return (
    <FocusScope contain restoreFocus autoFocus>
      <div role="dialog" aria-modal="true">
        {children}
        <button onClick={onClose}>Close</button>
      </div>
    </FocusScope>
  )
}

Step 3: Custom Hooks

import { useButton } from 'react-aria'
import { useRef } from 'react'

function CustomButton(props) {
  const ref = useRef(null)
  const { buttonProps } = useButton(props, ref)
  return <button {...buttonProps} ref={ref}>{props.children}</button>
}

Guidelines

  • React Aria = behavior + accessibility. You control styling (Tailwind, CSS-in-JS).
  • react-aria-components: pre-built accessible components with render props.
  • Individual hooks (useButton, useTextField) for fully custom designs.
  • FocusScope traps focus in modals — required for WCAG 2.1.
  • Test with VoiceOver (Mac), NVDA (Windows), keyboard-only.

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/terminalskills-skills-react-aria/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

terminalskills-skills-react-aria.ocm.jsonjson
{
  "ocm": "1",
  "id": "terminalskills-skills-react-aria",
  "kind": "skill",
  "name": "react-aria",
  "description": "Build accessible UI components with React Aria. Use when creating accessible form controls, implementing ARIA patterns, building design systems, or fixing accessibility issues.",
  "publisher": "terminalskills",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "general"
    ],
    "tags": [
      "skill-md",
      "react-aria",
      "accessibility",
      "a11y",
      "design-system",
      "components",
      "skills-sh"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "Build accessible UI components with React Aria. Use when creating accessible form controls, implementing ARIA patterns, building design systems, or fixing accessibility issues."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "skills.sh",
      "repository": "https://github.com/terminalskills/skills",
      "path": "skills/react-aria/SKILL.md",
      "ref": "HEAD",
      "url": "https://github.com/terminalskills/skills/blob/HEAD/skills/react-aria/SKILL.md",
      "key": "terminalskills/skills/skills/react-aria/SKILL.md"
    },
    "compatibility": "React 18+",
    "license": "Apache-2.0"
  },
  "instructions": "# React Aria\n\n## Overview\n\nReact Aria (Adobe) provides accessible UI primitives for React. Handles keyboard navigation, screen reader announcements, focus management, and ARIA attributes — you provide styling.\n\n## Instructions\n\n### Step 1: Accessible Components\n\n```tsx\nimport { Button, Label, ListBox, ListBoxItem, Popover, Select, SelectValue } from 'react-aria-components'\n\nexport function SelectField({ label, items, onSelectionChange }) {\n  return (\n    <Select onSelectionChange={onSelectionChange}>\n      <Label>{label}</Label>\n      <Button><SelectValue /><span aria-hidden=\"true\">▼</span></B",
  "cost": {
    "context_tokens": 481
  }
}

Fetch it by URL: GET /api/v1/registry/terminalskills-skills-react-aria/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.