.agents/skills/frontend-code-review/references/accessibility-ui.md
Accessibility findings are first-class review findings. Treat broken keyboard access, missing accessible names, focus loss, and unreachable popup content as correctness bugs, not polish.
Before finalizing UI or accessibility findings, fetch the latest Web Interface Guidelines as a required baseline:
https://raw.githubusercontent.com/vercel-labs/web-interface-guidelines/main/command.md
Do not treat that document as the complete accessibility rule set. Combine it with:
packages/dify-ui/README.md, packages/dify-ui/AGENTS.md, and the relevant primitive implementation when code uses @langgenius/dify-ui/*..d.ts contracts when primitive semantics, focus target, labels, or popup reachability are unclear.Flag:
div or span used for actions.onClick when a Link / <a> is the real semantic element.aria-label or aria-labelledby.aria-hidden="true".alt; use alt="" only when truly decorative.Prefer semantic HTML before ARIA.
Flag:
focus-visible treatment.outline-none / outline-hidden without an equivalent focus-visible ring or state.Use focus-visible for keyboard focus. Use focus-within or has-[:focus-visible] when the visual wrapper is not the focused element.
Flag:
name on form fields that submit or validate.type, inputMode, autoComplete, or spellCheck for email, token, URL, number, search, code, or username fields.type="button".onPaste blocking paste.Prefer visible labels. If visible surrounding text already labels the control, use a visually hidden label or a precise aria-label.
Flag:
aria-busy, role="status", or another accessible update path when it changes user interaction.aria-disabled used without manually blocking click, Space, and Enter.Use native disabled when the control must not be interactive. Use aria-disabled only when the element must remain focusable and the code handles all blocked interactions.
For repeated shared disabled reasons, prefer a visible group message or badge plus native disabled controls. Use per-control popover/info only when the reason is item-specific.
Flag:
Use Popover for explanatory content, rich help, and infotips. Use Tooltip only as a short visual label for a trigger that already has an accessible name.
Flag:
min-w-0 when it can overflow.truncate, line-clamp, or break-words.The usual Dify layout chain is: container has width constraints, text region uses min-w-0 flex-1 truncate, adornments use shrink-0.
Flag:
transition-all.... instead of ….Intl.*.