agentleFS
LazyAGILazyAGI/LazyMind/skills/.curated/ui-resilient-accessibility/SKILL.md

ui-resilient-accessibility

Skill78 starsChanged 5 months agoApache-2.0View on GitHub

Build and review UI components for robust accessibility and runtime resilience, including semantic structure, keyboard support, loading and error states, retry flows, and predictable async behavior.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when a UI must remain usable, accessible, and stable under imperfect conditions.

    line 8
  2. Distinctive:

    Add focus management for dialogs, drawers, and route transitions.

    line 25
  3. Distinctive:

    Ensure retries do not duplicate side effects for non-idempotent operations.

    line 32

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

UI Resilient Accessibility

Use this skill when a UI must remain usable, accessible, and stable under imperfect conditions.

When to use

  • Shipping new pages, complex components, or interactive widgets.
  • Fixing regressions caused by async loading, race conditions, or keyboard traps.
  • Preparing admin or customer-facing UI for production readiness.

Core principles

  • Semantics first: prefer native HTML elements before custom role emulation.
  • Keyboard complete: every actionable element must be operable without a mouse.
  • State explicitness: always define loading, empty, success, and error states.
  • Async predictability: handle cancellation, stale responses, and rapid re-requests.
  • Failure recovery: give users clear next steps and safe retry behavior.

Delivery workflow

  1. Define state model for each async view before coding UI details.
  2. Implement semantic markup and accessible names for controls and regions.
  3. Add focus management for dialogs, drawers, and route transitions.
  4. Guard against out-of-order responses and set-state-after-unmount issues.
  5. Provide clear empty and error messages with retry paths.
  6. Validate with keyboard-only walkthrough and screen-reader-friendly labels.

Reliability checks

  • Disable unsafe repeat actions while requests are pending.
  • Ensure retries do not duplicate side effects for non-idempotent operations.
  • Render skeleton or loading indicators that do not shift layout excessively.
  • Preserve critical user context after transient failures.
  • Fail closed for privileged actions when permission data is uncertain.

Accessibility checks

  • One clear page heading hierarchy.
  • Inputs have associated labels and error text linked via aria-describedby.
  • Modals trap focus and restore focus on close.
  • Contrast and focus indicators are visible.
  • Announce async status changes where needed (aria-live).

Suggested checks

rg -n "aria-|role=|tabIndex|onKeyDown|onKeyUp|onClick" frontend/src
rg -n "loading|isLoading|error|retry|empty|skeleton" frontend/src
rg -n "useEffect|AbortController|cleanup|unmount|stale" frontend/src

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.