before_building
Before building: requirements and reference code
Call BEFORE designing or building any interactive component or screen: menus, dialogs, carousels, tabs, forms, drag and drop, custom controls, cards, tables, charts, animation. This includes wireframes, mockups and prototypes. Takes the request in the user’s own words and returns the guides that apply with the requirements to build in from the start (keys, roles and names, focus, what is announced), working reference code, and the checks split into what the agent can confirm and what a person must. When the request itself breaks a rule (autoplay with no pause, a placeholder as the only label, a div as a button, hover-only menus, removed focus outlines, disabled zoom), it returns a version that keeps what the user wanted and passes, plus one sentence to say to the user. Do not refuse such a request, and do not build the failing version quietly.
输入参数limitlocalerequest必填
find_fix
Find the fix for an accessibility problem
Search the Learn guides by words, component name, tag, ARIA attribute or WCAG number (1.4.3, SC 2.1.1, JIS 達成基準, EN 301 549 9.x). Returns for each matching topic: the problem, the fix in one line, how to test it, the guide link, and the criterion in WCAG, EN 301 549, Section 508 and JIS X 8341-3 terms. Topics with no guide yet come back as "in progress". Use it when a finding, a complaint, a failing check or a question names a problem.
输入参数limitquery必填locale
get_guide
Get one guide as Markdown
The full guide as Markdown, the same as easeweb.dev/learn/<slug>.md: what happens, why it fails, who it affects, what automation misses, the Before and After code, how to verify, and the limits. Also returns the After code as plain text with its marks (recommended, not enough on its own, the rule of thumb behind it). Get the slug from find_fix or before_building.
输入参数slug必填locale
test_steps
How to test a fix: agent checks and the person’s script
Call AFTER building or fixing something, and before telling the user it is done. For a guide (by slug) or a component (by query) returns the pass criteria, the checks the agent can run itself, the checks only a person can do (which keys to press and what should happen, as a two-minute script), the guide’s limits, and a Playwright regression test skeleton. Hand the person’s checks to the user as written; never report them as done.
输入参数slugquerylocale
check_palette
Check colour contrast for text and controls
Call when choosing or changing colours, a palette or design tokens, before they are used in a design or in code. Takes colour pairs (foreground and background, with text size in px and weight when the foreground is text, or use: "non-text" for control borders, icons and focus rings) or a set of named tokens, in hex, rgb() or hsl(). Returns each pair’s contrast ratio, pass or fail against WCAG 1.4.3 (text) and 1.4.11 (non-text) at AA or AAA, the nearest passing shade of the same hue, and the guides that apply. It checks values, not rendered pages: text over images, real focus states and forced colors stay with the audit.
输入参数levelpairslocaletokens