UI Hub 是一个每日更新的免费 UI 资源目录,给设计师、前端开发者和做界面的 AI Agent 用:共 2,395 条资源,其中 133 个组件库、1,929 个带明暗预览的组件样式示例,另有设计 skill 与 AI 设计技巧文章。UI Hub 是一個每日更新的免費 UI 資源目錄,給設計師、前端開發者和做介面的 AI Agent 用:共 2,395 條資源,其中 133 個元件庫、1,929 個附明暗預覽的元件樣式示例,另有設計 skill 與 AI 設計技巧文章。UI Hub is a free, daily-updated directory of UI resources for designers, front-end developers and AI agents that build interfaces: 2,395 resources, including 133 component libraries and 1,929 component style demos with light/dark previews, plus design skills and AI design articles.UI Hub は、デザイナー・フロントエンド開発者・UI を作る AI エージェント向けの、毎日更新される無料の UI リソース集です。全 2,395 件(コンポーネントライブラリ 133 件、ライト/ダーク対応のスタイルデモ 1,929 件)に加え、デザインスキルと AI デザイン記事を掲載しています。UI Hub는 디자이너, 프론트엔드 개발자, 인터페이스를 만드는 AI 에이전트를 위한 매일 업데이트되는 무료 UI 리소스 디렉터리입니다. 총 2,395개 리소스(컴포넌트 라이브러리 133개, 라이트/다크 미리보기가 있는 스타일 데모 1,929개)와 디자인 스킬, AI 디자인 글을 제공합니다.UI Hub ialah direktori sumber UI percuma yang dikemas kini setiap hari untuk pereka, pembangun front-end dan ejen AI yang membina antara muka: 2,395 sumber, termasuk 133 pustaka komponen dan 1,929 demo gaya komponen dengan pratonton terang/gelap, serta kemahiran reka bentuk dan artikel reka bentuk AI.UI Hub là danh mục tài nguyên UI miễn phí, cập nhật hằng ngày, dành cho nhà thiết kế, lập trình viên front-end và AI agent dựng giao diện: 2,395 tài nguyên, gồm 133 thư viện component và 1,929 mẫu phong cách component có xem trước sáng/tối, cùng skill thiết kế và bài viết về thiết kế với AI.UI Hub est un annuaire gratuit de ressources UI, mis à jour chaque jour, pour designers, développeurs front-end et agents IA qui construisent des interfaces : 2,395 ressources, dont 133 bibliothèques de composants et 1,929 démos de styles avec aperçus clair/sombre, plus des skills de design et des articles sur le design avec l’IA.UI Hub es un directorio gratuito de recursos de UI, actualizado a diario, para diseñadores, desarrolladores front-end y agentes de IA que construyen interfaces: 2,395 recursos, incluidas 133 bibliotecas de componentes y 1,929 demos de estilos con vista clara/oscura, además de skills de diseño y artículos de diseño con IA.UI Hub ist ein kostenloses, täglich aktualisiertes Verzeichnis von UI-Ressourcen für Designer, Frontend-Entwickler und KI-Agents, die Oberflächen bauen: 2,395 Ressourcen, darunter 133 Komponentenbibliotheken und 1,929 Komponenten-Stildemos mit Hell/Dunkel-Vorschau, dazu Design-Skills und Artikel zu KI-Design.

← 百科百科Encyclopedia百科백과EnsiklopediaBách khoaEncyclopédieEnciclopediaEnzyklopädie · 笔记筆記Noteノート노트NotaGhi chúNoteNotaNotiz · blog · accessibility

Accessibility in AI-generated UI: the checks models skip

阅读博客原文閱讀部落格原文Read the blog postブログ記事を読む블로그 글 읽기Baca artikel blogĐọc bài blogLire l’articleLeer el artículoBlogbeitrag lesen →原始 Markdown原始 MarkdownRaw Markdown生Markdown원본 MarkdownMarkdown mentahMarkdown gốcMarkdown brutMarkdown en brutoRohes Markdown

本条目正文为英文,作为 AI Agent 上下文使用。

本條目正文為英文,作為 AI Agent 上下文使用。

この項目の本文は英語です(AIエージェントの文脈用)。

이 항목의 본문은 영어입니다(AI 에이전트 컨텍스트용).

Kandungan entri ini dalam bahasa Inggeris (untuk konteks ejen AI).

Nội dung mục này bằng tiếng Anh (dùng làm ngữ cảnh cho AI agent).

Le contenu de cette entrée est en anglais (contexte pour agents IA).

El contenido de esta entrada está en inglés (contexto para agentes de IA).

Der Inhalt dieses Eintrags ist auf Englisch (Kontext für KI-Agents).

Generated UIs look fine and fail keyboards and screen readers. Start from accessible primitives, then audit against WCAG 2.2.

Models optimise for what a screenshot shows. Focus order, accessible names, keyboard behaviour and live regions do not show up in screenshots, so they are the first things to go missing from generated UI. The good news is that the failures are predictable. This post lists the checks models skip most often, gives the fix for each, and shows how to make accessibility part of the agent's definition of done instead of a final pass nobody has time for.

Why generated UI fails in the same places

A generator learns from millions of pages, and a large share of the web has accessibility problems. Automated audits of popular home pages keep finding the same short list: low-contrast text, missing alternative text, empty links and buttons, missing form labels. Those are exactly the patterns a model reproduces when nobody asks for anything else. The fix is not a smarter model; it is explicit constraints plus a check the agent runs itself.

The checks models skip most

1. Clickable divs. <div onClick> looks like a button and is not one: no focus, no Enter or Space, no role. Use <button> for actions and <a href> for navigation.

Save

2. Missing focus styles. Generators often add outline: none to remove the browser ring because it "looks messy" in screenshots. Replace it, don't remove it:

:focus { outline: none; } :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

:focus-visible shows the ring for keyboard users and hides it for most mouse clicks, which is what designers usually wanted in the first place.

3. Icon-only buttons with no name. A trash icon is obvious to sighted users and silent to a screen reader. Add aria-label="Delete project" or visually hidden text.

4. Contrast of secondary text. Grey-on-grey captions, placeholders and disabled labels are the most common WCAG failure (success criterion 1.4.3 asks for 4.5:1 for normal text). Check both themes.

5. Target size. WCAG 2.2 adds 2.5.8 Target Size (Minimum): interactive targets should be at least 24×24 CSS pixels, or have enough spacing. Tiny close buttons and dense icon toolbars fail it on phones.

6. Dialogs without focus management. A modal must move focus inside when it opens, keep Tab inside while open, close on Escape and return focus to the trigger. The ARIA Authoring Practices Guide documents the pattern; Radix, React Aria and the native <dialog> element implement it.

7. Forms without labels. Placeholder text is not a label; it disappears when you type. Every input needs a <label for> or aria-labelledby, and errors should be linked with aria-describedby.

8. Dynamic updates nobody announces. "Saved", "3 results" and validation errors that appear without a page change need a live region (role="status" or aria-live="polite") to be heard.

Step by step: build accessibility into the workflow

Step 1: generate on accessible primitives. Ask the agent to use your kit built on Radix, React Aria or native elements. It is much easier to keep accessibility than to retrofit it.

Step 2: put the rules in the prompt and in AGENTS.md. A short list beats a long one: semantic elements, visible focus, labels, 4.5:1 contrast, 24px targets, dialog focus management.

Step 3: run an automated check. axe-core catches a meaningful share of issues automatically. With Playwright you can make it part of the test suite:

import { test, expect } from "@playwright/test"; import AxeBuilder from "@axe-core/playwright";

test("pricing page has no detectable a11y violations", async ({ page }) => { await page.goto("/pricing"); const results = await new AxeBuilder({ page }) .withTags(["wcag2a", "wcag2aa", "wcag22aa"]) .analyze(); expect(results.violations).toEqual([]); });

Step 4: do a two-minute keyboard pass. Unplug the mouse. Tab through the page: can you see where you are, reach everything, open and close every menu, and never get trapped? Automated tools cannot judge focus order or whether a label makes sense.

Step 5: listen once. Turn on VoiceOver or NVDA and read the main flow. Five minutes is enough to find unlabeled buttons and confusing headings.

What to put in the pull-request template

A short, repeated checklist does more than a long policy document nobody opens. Ours has five lines: keyboard pass done (yes/no), new interactive elements are native or use an accessible primitive, contrast checked in both themes, new images have alt text or are marked decorative, and axe test passes. When an agent opens the pull request, ask it to fill in the template honestly and to write NEEDS HUMAN where it could not check something itself, such as how the flow sounds in a screen reader.

Pitfalls

Questions we get

Which WCAG level should we aim for? WCAG 2.2 AA is the common target and what most accessibility laws and procurement rules refer to. Start there; individual AAA criteria are worth adopting where they are cheap, such as larger targets.

Can the agent test with a screen reader itself? Not reliably. It can run axe, check the accessibility tree and reason about labels, but a short human pass with VoiceOver or NVDA still finds problems no tool reports, such as confusing reading order or redundant announcements.

Does using Radix or React Aria make us compliant? It makes compliance much easier for the widgets they cover. You still own contrast, labels, headings, alt text, focus styles and the content itself.

How do we stop regressions? Keep the axe test in CI, add a keyboard-only end-to-end test for the main flow, and include accessibility items in the pull-request template so reviewers check them every time.

Our take

Make accessibility structural, not a final pass. Generate on top of accessible primitives, keep the eight checks above in your prompts, run axe in CI and add an audit skill (accessibility, web-design-guidelines) to the agent's definition of done. Accessible UI is also better UI for everyone: keyboard power users, people on bright-sunlit phones, and the agent itself, which navigates pages through the same accessibility tree screen readers use.

Checklist

References