一键导入
accessibility
Accessibility patterns and requirements for this project. Use when creating interactive components, forms, dialogs, or any user-facing UI.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Accessibility patterns and requirements for this project. Use when creating interactive components, forms, dialogs, or any user-facing UI.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Code review of current PR/commit changes against project coding standards. Use when the user asks for a code review or mentions reviewing changes.
Reference for the Tangle component YAML specification format
Guidelines for building well-structured, maintainable ML pipelines in Tangle
Analyzes merged PRs from the past week, identifies user-facing changes, and opens a draft PR to the TangleML/website docs repo with updated documentation. Use when running the weekly documentation sync, or when the user invokes /docs-update.
React and React Compiler patterns for this project. Use when writing React components, hooks, providers, or working with React Compiler compatibility.
Run validation and testing commands for the project. Use when the user asks to validate, lint, typecheck, or run tests.
| name | accessibility |
| description | Accessibility patterns and requirements for this project. Use when creating interactive components, forms, dialogs, or any user-facing UI. |
This project builds on shadcn/ui primitives which provide strong built-in a11y. Follow these patterns to maintain that standard.
All interactive elements without visible text must have an aria-label:
// Icon buttons
<Button variant="ghost" aria-label="Home">
<Icon name="Home" />
</Button>
// Folder toggles
<div role="button" aria-expanded={isOpen} aria-label={`Folder: ${folder.name}`}>
Link inputs to labels and error messages:
<Input
id={id}
aria-invalid={!!error}
aria-describedby={`${id}-hint`}
/>
{!!error && <Text tone="critical">{error.join("\n")}</Text>}
<div id={`${id}-hint`}>{hint}</div>
Use the shadcn/ui Label component for proper form associations.
// The Input component has built-in onEnter and onEscape props
<Input onEnter={save} onEscape={cancel} />
// For non-Input elements, handle manually
onKeyDown={(e) => {
if (e.key === "Enter" && !e.shiftKey) {
e.preventDefault();
save();
} else if (e.key === "Escape") {
e.preventDefault();
cancel();
}
}
role="button" and tabIndex={0}:<div role="button" tabIndex={0} title="Click to edit">
{content}
</div>
The dialog component already handles this — use preventKeyboardPropagation prop when needed. This stops Ctrl+A, Ctrl+C, Ctrl+V, Tab, Enter, and Escape from reaching React Flow.
Use sr-only class for visually hidden but screen-reader-accessible text:
// Close buttons with only an icon
<DialogClose>
<Cross2Icon />
<span className="sr-only">Close</span>
</DialogClose>
// Command palette title
<DialogHeader className="sr-only">
<DialogTitle>{title}</DialogTitle>
<DialogDescription>{description}</DialogDescription>
</DialogHeader>
Use proper semantic elements and ARIA roles:
// Navigation
<nav aria-label="breadcrumb">
// Current page in breadcrumb
<span role="link" aria-disabled="true" aria-current="page">{children}</span>
// Decorative separators
<li role="presentation" aria-hidden="true">
// Alerts
<div role="alert">
All focusable elements must use the project's focus-visible ring pattern:
focus-visible:ring-ring/50 focus-visible:ring-[3px] focus-visible:border-ring
Do not remove outline-none without replacing it with a visible focus indicator.
The project's primitives already accept AriaAttributes:
BlockStack and InlineStack accept all ARIA propsText accepts role and ARIA propsButton has built-in focus-visible and disabled statesInput supports aria-invalid, onEnter, onEscapeThe pipeline editor has specific a11y needs:
role="button" with aria-expandedWhen adding new interactive elements to the flow canvas, ensure they: