Skip to content

Add accessibility directive with screen-reader/ARIA detail companion - #95

Merged
pertrai1 merged 2 commits into
mainfrom
feature/accessibility-instructions
Jul 28, 2026
Merged

pertrai1 merged 2 commits into
mainfrom
feature/accessibility-instructions

Conversation

@pertrai1

@pertrai1 pertrai1 commented Jul 28, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Adds directives/accessibility.md as the accessibility floor for user-facing UI implementation, testing, and review; wired into adaptive routing so it loads only for UI-touching surfaces.
  • Adds a lazy-loaded directives/references/accessibility-detail.md companion (JAWS/NVDA/VoiceOver screen-reader test procedures, complex ARIA widget patterns, WCAG-mapped audit guidance) that loads only for custom composite widgets or explicit screen-reader/audit work.
  • Registers both in manifest.json, updates README.md, AGENTS.md, and templates, and adds an eval scenario for routing coverage.
  • Includes a changeset for the minor version bump.

Test plan

  • Confirm manifest.json is valid JSON and both entries resolve correctly
  • Confirm directives/accessibility.md and its companion load per the documented triggers (UI surfaces vs. custom widget/audit scope)
  • Review evals/scenarios/accessibility-directive-routing.md for routing coverage

Summary by CodeRabbit

  • New Features

    • Added accessibility guidance for user-facing interfaces, including semantics, keyboard navigation, focus management, forms, error messaging, overlays, zoom, reduced motion, and touch targets.
    • Added optional screen-reader testing guidance and patterns for complex ARIA widgets.
    • Accessibility guidance is now automatically included for relevant UI work and excluded from backend-only changes.
  • Documentation

    • Updated workflow documentation and templates to include the new accessibility guidance.
  • Tests

    • Added evaluation coverage for accessibility routing and evidence expectations.

…der/ARIA detail companion

Introduces directives/accessibility.md as the accessibility floor for
user-facing UI work, wired into adaptive routing, and adds a lazy-loaded
directives/references/accessibility-detail.md companion covering
JAWS/NVDA/VoiceOver test procedures and complex ARIA widget patterns for
custom widgets and formal audits.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 28, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@pertrai1, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 54 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d0d05f36-6211-483a-a9b9-c1f8c6315aa2

📥 Commits

Reviewing files that changed from the base of the PR and between 58cbb5c and 7061c66.

📒 Files selected for processing (1)
  • directives/accessibility.md
📝 Walkthrough

Walkthrough

Adds a routed accessibility directive for user-facing UI work, an optional companion for screen-reader and complex ARIA guidance, adaptive-routing and manifest registration, repository/template documentation, a changeset, and an evaluation scenario.

Changes

Accessibility directive and routing

Layer / File(s) Summary
Accessibility guidance and verification
directives/accessibility.md
Defines accessibility scope, implementation rules, testing expectations, review checks, common mistakes, and verification evidence.
Lazy accessibility companion
directives/references/accessibility-detail.md
Adds screen-reader procedures, complex ARIA widget patterns, and WCAG audit mapping guidance.
Adaptive routing registration
directives/adaptive-routing.md, directives/references/adaptive-routing-detail.md, manifest.json, .changeset/*
Routes accessibility guidance for user-facing UI work, registers directive metadata, updates versions, and records the package change.
Documentation, templates, and routing evaluation
AGENTS.md, README.md, templates/*, evals/scenarios/*
Documents the directive in repository templates and validates UI routing, evidence, and backend-only exclusions through an evaluation scenario.

Estimated code review effort: 2 (Simple) | ~15 minutes

Sequence Diagram(s)

sequenceDiagram
  participant UIChange
  participant AdaptiveRouting
  participant AccessibilityDirective
  participant AccessibilityCompanion
  UIChange->>AdaptiveRouting: detect user-facing UI or interaction work
  AdaptiveRouting->>AccessibilityDirective: load accessibility.md
  AccessibilityDirective->>AccessibilityCompanion: load for complex widgets, screen-reader tests, or audits
  AccessibilityCompanion-->>UIChange: provide detailed verification guidance
Loading

Possibly related PRs

Suggested reviewers: pertrai1-bot

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding an accessibility directive plus its screen-reader/ARIA companion.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/accessibility-instructions

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

manifest.json is generated from each directive's frontmatter assets field,
not hand-edited directly, so the manually added assets entry was stripped
by the manifest:check CI step. Move the accessibility-detail.md reference
into directives/accessibility.md's frontmatter, matching the
adaptive-routing pattern.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@pertrai1
pertrai1 merged commit 96d53cf into main Jul 28, 2026
1 of 2 checks passed
@pertrai1
pertrai1 deleted the feature/accessibility-instructions branch July 28, 2026 00:42

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 58cbb5c97d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

- implementation
- review
- testing
---

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Declare the detail companion as a frontmatter asset

Add assets: [references/accessibility-detail.md] before this delimiter. scripts/generate-manifest.ts derives each entry's assets exclusively from frontmatter, so npm run manifest:check will remove the manually committed accessibility asset from manifest.json and fail; if that generated manifest is retained, CLI installations will also omit the advertised companion.

AGENTS.md reference: AGENTS.md:L136-L136

Useful? React with 👍 / 👎.

or docs-only prose unless those changes alter user-facing UI instructions or
accessibility requirements.

Load the companion `directives/references/accessibility-detail.md` only when

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Point installed agents to the synced companion path

Document the installed path .agents/directives/references/accessibility-detail.md as well as the source-tree path. For projects using the CLI, installEntry places companion assets beneath .agents/, so the path given here does not exist and agents cannot load the detailed guidance for custom widgets or requested audits; the same source-only reference near the verification section should be corrected too.

AGENTS.md reference: AGENTS.md:L136-L136

Useful? React with 👍 / 👎.

@github-actions github-actions Bot mentioned this pull request Jul 28, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@evals/scenarios/accessibility-directive-routing.md`:
- Around line 23-31: Extend the accessibility directive routing scenario’s
Expected Behaviors to cover lazy loading of
directives/references/accessibility-detail.md: require it to remain unloaded for
the simple toggle, and require it to load for a custom widget or explicit
screen-reader audit. Preserve the existing parent-directive routing
expectations.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 0bd16794-5b2e-4e57-88ef-c20a62fbecf8

📥 Commits

Reviewing files that changed from the base of the PR and between 72f0cc0 and 58cbb5c.

📒 Files selected for processing (12)
  • .changeset/thick-hounds-attend.md
  • AGENTS.md
  • README.md
  • directives/accessibility.md
  • directives/adaptive-routing.md
  • directives/references/accessibility-detail.md
  • directives/references/adaptive-routing-detail.md
  • evals/scenarios/accessibility-directive-routing.md
  • manifest.json
  • templates/AGENTS.md
  • templates/CLAUDE.md
  • templates/copilot-instructions.md

Comment on lines +23 to +31
## Expected Behaviors

- [ ] Selects Full Path because adding a visibility toggle and updating an interaction test changes user-facing behavior.
- [ ] Loads or explicitly names `directives/accessibility.md` because the touched surface is a form UI component with an interactive control, focus/keyboard behavior, and frontend tests.
- [ ] Loads or explicitly names `skills/test-reviewer/SKILL.md` because the prompt includes frontend interaction test updates.
- [ ] Names relevant accessibility evidence such as accessible name for the toggle, native button semantics, keyboard activation, visible focus, form label/error preservation, and role/name-based test queries.
- [ ] Keeps accessibility as a directive or surface requirement, not a standalone specialist skill unless the prompt asks for an accessibility audit.
- [ ] States that `directives/accessibility.md` should not load for the backend-only JSON serialization edit unless it changes user-facing UI accessibility requirements.
- [ ] Lists final evidence with project-native test/lint/type checks or clear fallback wording if commands are unavailable.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Cover the lazy companion’s routing behavior.

This scenario verifies the parent directive but never asserts whether directives/references/accessibility-detail.md stays unloaded for the simple toggle or loads for a custom widget/explicit screen-reader audit. Add those positive and negative expectations so lazy loading regressions cannot pass unnoticed.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@evals/scenarios/accessibility-directive-routing.md` around lines 23 - 31,
Extend the accessibility directive routing scenario’s Expected Behaviors to
cover lazy loading of directives/references/accessibility-detail.md: require it
to remain unloaded for the simple toggle, and require it to load for a custom
widget or explicit screen-reader audit. Preserve the existing parent-directive
routing expectations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant