{"id":"1bba4dff-2291-414b-886c-5c1a83ea7026","shortId":"ypcSqD","kind":"skill","title":"web-design-guidelines","tagline":"UI/UX best practices and accessibility audit. Use when reviewing UI code, checking accessibility, running accessibility audits, auditing forms, or ensuring web interface best practices. Triggers on \"audit accessibility\", \"check WCAG\", \"review UI\", \"check accessibility\", \"audit de","description":"# Web Design Guidelines\n\nWCAG accessibility, semantic HTML, keyboard navigation, forms, and performance patterns for inclusive web interfaces. Contains 23 rules across 4 categories. Supports both **coding reference** and **audit mode**.\n\n## Metadata\n\n- **Version:** 2.1.0\n- **Rule Count:** 23 rules across 4 categories\n- **License:** MIT\n\n## How to Audit\n\nWhen the user asks to \"audit accessibility\", \"check WCAG compliance\", or \"review accessibility\" — run the checklist below against their codebase.\n\n### Step 1: Determine Scope\n\n- If arguments provided (`$ARGUMENTS`): audit only those files or components\n- If no arguments: audit all UI components and pages in the codebase\n\n### Step 2: Detect Stack\n\nCheck the project for:\n- `.tsx`/`.jsx` files → React\n- `.vue` files → Vue\n- `.blade.php` files → Laravel Blade\n- `.html` files → Static HTML\n\n### Step 3: Run Accessibility Checklist\n\nWork through every item below. For each, output:\n- **PASS** — brief confirmation of what was verified\n- **FAIL** — exact `file:line`, description of the issue, and fix recommendation\n- **N/A** — if the check does not apply to this project\n\n#### Semantic HTML & Structure\n- [ ] Pages use semantic elements (`<header>`, `<main>`, `<nav>`, `<footer>`, `<article>`, `<section>`) — not `<div>` soup\n- [ ] Heading hierarchy is sequential (`h1` → `h2` → `h3`) — no skipped levels\n- [ ] One `<h1>` per page\n- [ ] Skip link exists to bypass navigation (`<a href=\"#main-content\">Skip to content</a>`)\n- [ ] Landmark regions are labelled when duplicated (`aria-label` on multiple `<nav>` elements)\n\n#### Keyboard Navigation\n- [ ] All interactive elements are reachable via Tab key\n- [ ] Focus order follows visual order (no positive `tabindex` values)\n- [ ] Focus indicator is visible on all focusable elements (not removed with `outline: none` without replacement)\n- [ ] Modal dialogs trap focus and return focus on close\n- [ ] Custom components (dropdowns, tabs, accordions) support expected keyboard patterns (Arrow keys, Escape, Enter)\n\n#### Images & Media\n- [ ] All `<img>` elements have `alt` attributes — descriptive for content images, empty (`alt=\"\"`) for decorative\n- [ ] Complex images (charts, diagrams) have extended descriptions\n- [ ] Video content has captions or transcripts\n\n#### Color & Contrast\n- [ ] Text meets WCAG AA contrast ratio (4.5:1 for normal text, 3:1 for large text)\n- [ ] Information is not conveyed by color alone (e.g., error states use icons + text, not just red)\n- [ ] UI components and focus indicators meet 3:1 contrast ratio against background\n\n#### Forms\n- [ ] Every input has an associated `<label>` (not just placeholder text)\n- [ ] Required fields indicated with both visual cue and `aria-required=\"true\"`\n- [ ] Error messages linked to inputs via `aria-describedby`\n- [ ] Error messages use `role=\"alert\"` or `aria-live=\"assertive\"` for screen reader announcement\n- [ ] Correct `type` attributes on inputs (`email`, `tel`, `url`, `number`)\n- [ ] `autocomplete` attributes present on common fields (name, email, address, credit card)\n\n#### ARIA & Screen Readers\n- [ ] ARIA labels on icon-only buttons (`aria-label=\"Close\"`)\n- [ ] Dynamic content updates use `aria-live` regions\n- [ ] Loading states announced to screen readers (`aria-busy=\"true\"`, status messages)\n- [ ] Decorative elements hidden from screen readers (`aria-hidden=\"true\"`)\n\n#### Motion & Animation\n- [ ] `prefers-reduced-motion` respected — animations disabled or reduced\n- [ ] No auto-playing video or audio without user control\n- [ ] No content that flashes more than 3 times per second\n\n### Step 4: Summary\n\nEnd the audit with:\n```\n## Accessibility Audit Summary\n- **PASS**: X checks\n- **FAIL**: X checks\n- **N/A**: X checks\n- **WCAG Level**: AA / Partial AA / Below AA\n- **Top Priority Fixes**: (list the 3 most impactful FAIL items)\n```\n\n---\n\n## When to Apply\n\nReference these guidelines when:\n- Running an accessibility audit on a codebase\n- Reviewing UI code for accessibility (WCAG compliance)\n- Implementing forms and interactions\n- Ensuring keyboard navigation works\n- Adding ARIA labels and live regions\n- Optimizing image loading and layout stability\n\n## Rule Categories by Priority\n\n| Priority | Category | Impact | Prefix |\n|----------|----------|--------|--------|\n| 1 | Accessibility | CRITICAL | `a11y-` |\n| 2 | Forms | HIGH | `form-` |\n| 3 | Animation & Motion | CRITICAL | `motion-` |\n| 4 | Performance & UX | MEDIUM | `perf-` |\n\n## Quick Reference\n\n### 1. Accessibility (CRITICAL)\n\n- `a11y-semantic-html` - Use semantic HTML elements\n- `a11y-heading-hierarchy` - Maintain proper heading hierarchy\n- `a11y-screen-reader` - Optimize for screen reader compatibility\n- `a11y-skip-links` - Provide skip links for navigation\n- `a11y-keyboard-nav` - Ensure full keyboard navigation\n- `a11y-focus-management` - Manage keyboard focus properly\n- `a11y-aria-labels` - Add ARIA labels to interactive elements\n- `a11y-color-contrast` - Ensure sufficient color contrast (WCAG AA)\n- `a11y-alt-text` - Provide meaningful alt text for images\n- `a11y-error-messages` - Make error messages accessible\n- `a11y-form-labels` - Associate labels with form inputs\n- `a11y-live-regions` - Announce dynamic content to screen readers\n\n### 2. Forms (HIGH)\n\n- `form-autocomplete` - Use autocomplete attributes\n- `form-input-types` - Use correct input types\n- `form-error-display` - Display form errors clearly\n- `form-validation-ux` - Design user-friendly validation\n- `form-inline-validation` - Implement smart inline validation\n- `form-multi-step` - Design effective multi-step forms\n- `form-placeholder-usage` - Use placeholders appropriately\n- `form-submit-feedback` - Provide clear submission feedback\n\n### 3. Animation & Motion (CRITICAL)\n\n- `motion-reduced` - Respect prefers-reduced-motion (WCAG AAA)\n\n### 4. Performance & UX (MEDIUM)\n\n- `perf-image-loading` - Optimize image loading for UX\n- `perf-layout-stability` - Prevent cumulative layout shift\n\n## Essential Guidelines\n\n### Semantic HTML\n\n```tsx\n// ❌ Div soup\n<div className=\"header\"><div className=\"nav\"><div onClick={handleClick}>Home</div></div></div>\n\n// ✅ Semantic HTML\n<header><nav aria-label=\"Main\"><a href=\"/\">Home</a></nav></header>\n<main><article><h1>Title</h1><p>Content</p></article></main>\n```\n\n### Form Accessibility\n\n```tsx\n<label htmlFor=\"email\">Email <span aria-hidden=\"true\">*</span></label>\n<input id=\"email\" type=\"email\" required aria-required=\"true\" aria-describedby=\"email-error\" autoComplete=\"email\" />\n{error && <p id=\"email-error\" role=\"alert\">{error}</p>}\n```\n\n### Reduced Motion\n\n```css\n@media (prefers-reduced-motion: reduce) {\n  *, *::before, *::after {\n    animation-duration: 0.01ms !important;\n    transition-duration: 0.01ms !important;\n  }\n}\n```\n\n## How to Use\n\nRead individual rule files for detailed explanations:\n\n```\nrules/a11y-semantic-html.md\nrules/form-autocomplete.md\nrules/motion-reduced.md\nrules/perf-image-loading.md\n```\n\n## References\n\n- [WCAG 2.2 Quick Reference](https://www.w3.org/WAI/WCAG22/quickref/)\n- [WAI-ARIA Authoring Practices](https://www.w3.org/WAI/ARIA/apg/)\n- [web.dev Accessibility](https://web.dev/accessibility/)\n- [MDN Accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility)\n- [The A11Y Project](https://a11yproject.com/)\n\n## Full Compiled Document\n\nFor the complete guide with all rules expanded: `AGENTS.md`","tags":["web","design","guidelines","agent","skills","asyrafhussin","agent-rules","agent-skills","ai-agents","ai-slop","claude-code","code-quality"],"capabilities":["skill","source-asyrafhussin","skill-web-design-guidelines","topic-agent-rules","topic-agent-skills","topic-ai-agents","topic-ai-slop","topic-claude-code","topic-code-quality","topic-code-review","topic-codex","topic-cursor","topic-laravel","topic-nodejs","topic-react"],"categories":["agent-skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/AsyrafHussin/agent-skills/web-design-guidelines","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add AsyrafHussin/agent-skills","source_repo":"https://github.com/AsyrafHussin/agent-skills","install_from":"skills.sh"}},"qualityScore":"0.469","qualityRationale":"deterministic score 0.47 from registry signals: · indexed on github topic:agent-skills · 39 github stars · SKILL.md body (7,336 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T18:58:25.860Z","embedding":null,"createdAt":"2026-05-16T18:57:15.463Z","updatedAt":"2026-05-18T18:58:25.860Z","lastSeenAt":"2026-05-18T18:58:25.860Z","tsv":"'/)':916 '/accessibility/)':905 '/en-us/docs/web/accessibility)':910 '/wai/aria/apg/)':900 '/wai/wcag22/quickref/)':892 '0.01':862,868 '1':107,332,337,364,594,614 '2':133,598,724 '2.1.0':73 '2.2':887 '23':59,76 '3':156,336,363,505,540,602,791 '4':62,79,510,607,805 '4.5':331 'a11y':597,618,626,634,643,652,660,668,678,688,698,706,715,912 'a11y-alt-text':687 'a11y-aria-labels':667 'a11y-color-contrast':677 'a11y-error-messages':697 'a11y-focus-management':659 'a11y-form-labels':705 'a11y-heading-hierarchy':625 'a11y-keyboard-nav':651 'a11y-live-regions':714 'a11y-screen-reader':633 'a11y-semantic-html':617 'a11y-skip-links':642 'a11yproject.com':915 'a11yproject.com/)':914 'aa':328,530,532,534,686 'aaa':804 'access':9,17,19,32,38,45,92,98,158,516,554,563,595,615,704,843,902,907 'accordion':286 'across':61,78 'ad':574 'add':671 'address':431 'agents.md':928 'alert':404 'alon':347 'alt':300,307,689,693 'anim':479,485,603,792,860 'animation-dur':859 'announc':413,458,718 'appli':192,547 'appropri':782 'argument':111,113,122 'aria':234,388,398,407,434,437,445,453,463,475,575,669,672,895 'aria-busi':462 'aria-describedbi':397 'aria-hidden':474 'aria-l':406,452 'aria-label':233,444 'aria-requir':387 'arrow':291 'ask':89 'assert':409 'associ':374,709 'attribut':301,416,424,732 'audio':495 'audit':10,20,21,31,39,69,85,91,114,123,514,517,555 'author':896 'auto':491 'auto-play':490 'autocomplet':423,729,731 'background':368 'best':6,27 'blade':150 'blade.php':147 'brief':169 'busi':464 'button':443 'bypass':222 'caption':320 'card':433 'categori':63,80,587,591 'chart':312 'check':16,33,37,93,136,189,521,524,527 'checklist':101,159 'clear':748,788 'close':281,447 'code':15,66,561 'codebas':105,131,558 'color':323,346,679,683 'common':427 'compat':641 'compil':918 'complet':922 'complex':310 'complianc':95,565 'compon':119,126,283,358 'confirm':170 'contain':58 'content':226,304,318,449,500,720,841 'contrast':324,329,365,680,684 'control':498 'convey':344 'correct':414,738 'count':75 'credit':432 'critic':596,605,616,794 'css':850 'cue':385 'cumul':823 'custom':282 'de':40 'decor':309,468 'describedbi':399 'descript':179,302,316 'design':3,42,753,770 'detail':879 'detect':134 'determin':108 'developer.mozilla.org':909 'developer.mozilla.org/en-us/docs/web/accessibility)':908 'diagram':313 'dialog':274 'disabl':486 'display':744,745 'div':831,833 'document':919 'dropdown':284 'duplic':232 'durat':861,867 'dynam':448,719 'e.g':348 'effect':771 'element':202,238,243,265,298,469,624,676 'email':419,430,845 'empti':306 'end':512 'ensur':24,570,655,681 'enter':294 'error':349,391,400,699,702,743,747,846,847 'escap':293 'essenti':826 'everi':162,370 'exact':176 'exist':220 'expand':927 'expect':288 'explan':880 'extend':315 'fail':175,522,543 'feedback':786,790 'field':380,428 'file':117,142,145,148,152,177,877 'fix':184,537 'flash':502 'focus':249,258,264,276,279,360,661,665 'follow':251 'form':22,50,369,567,599,601,707,712,725,728,734,742,746,750,759,767,775,777,784,842 'form-autocomplet':727 'form-error-display':741 'form-inline-valid':758 'form-input-typ':733 'form-multi-step':766 'form-placeholder-usag':776 'form-submit-feedback':783 'form-validation-ux':749 'friend':756 'full':656,917 'guid':923 'guidelin':4,43,550,827 'h1':209 'h2':210 'h3':211 'handleclick':835 'head':205,627,631 'hidden':470,476 'hierarchi':206,628,632 'high':600,726 'home':836,839 'html':47,151,154,197,620,623,829,838 'icon':352,441 'icon-on':440 'imag':295,305,311,581,696,811,814 'impact':542,592 'implement':566,762 'import':864,870 'inclus':55 'indic':259,361,381 'individu':875 'inform':341 'inlin':760,764 'input':371,395,418,713,735,739 'interact':242,569,675 'interfac':26,57 'issu':182 'item':163,544 'jsx':141 'key':248,292 'keyboard':48,239,289,571,653,657,664 'label':230,235,438,446,576,670,673,708,710 'landmark':227 'laravel':149 'larg':339 'layout':584,820,824 'level':214,529 'licens':81 'line':178 'link':219,393,645,648 'list':538 'live':408,454,578,716 'load':456,582,812,815 'maintain':629 'make':701 'manag':662,663 'mdn':906 'meaning':692 'media':296,851 'medium':610,808 'meet':326,362 'messag':392,401,467,700,703 'metadata':71 'mit':82 'modal':273 'mode':70 'motion':478,483,604,606,793,796,802,849,855 'motion-reduc':795 'ms':863,869 'multi':768,773 'multi-step':772 'multipl':237 'n/a':186,525 'name':429 'nav':654 'navig':49,223,240,572,650,658 'none':270 'normal':334 'number':422 'onclick':834 'one':215 'optim':580,637,813 'order':250,253 'outlin':269 'output':167 'page':128,199,217 'partial':531 'pass':168,519 'pattern':53,290 'per':216,507 'perf':611,810,819 'perf-image-load':809 'perf-layout-st':818 'perform':52,608,806 'placehold':377,778,781 'play':492 'posit':255 'practic':7,28,897 'prefer':481,800,853 'prefers-reduced-mot':480,799,852 'prefix':593 'present':425 'prevent':822 'prioriti':536,589,590 'project':138,195,913 'proper':630,666 'provid':112,646,691,787 'quick':612,888 'ratio':330,366 'reachabl':245 'react':143 'read':874 'reader':412,436,461,473,636,640,723 'recommend':185 'red':356 'reduc':482,488,797,801,848,854,856 'refer':67,548,613,885,889 'region':228,455,579,717 'remov':267 'replac':272 'requir':379,389 'respect':484,798 'return':278 'review':13,35,97,559 'role':403 'rule':60,74,77,586,876,926 'rules/a11y-semantic-html.md':881 'rules/form-autocomplete.md':882 'rules/motion-reduced.md':883 'rules/perf-image-loading.md':884 'run':18,99,157,552 'scope':109 'screen':411,435,460,472,635,639,722 'second':508 'semant':46,196,201,619,622,828,837 'sequenti':208 'shift':825 'skill' 'skill-web-design-guidelines' 'skip':213,218,224,644,647 'smart':763 'soup':204,832 'source-asyrafhussin' 'stabil':585,821 'stack':135 'state':350,457 'static':153 'status':466 'step':106,132,155,509,769,774 'structur':198 'submiss':789 'submit':785 'suffici':682 'summari':511,518 'support':64,287 'tab':247,285 'tabindex':256 'tel':420 'text':325,335,340,353,378,690,694 'time':506 'titl':840 'top':535 'topic-agent-rules' 'topic-agent-skills' 'topic-ai-agents' 'topic-ai-slop' 'topic-claude-code' 'topic-code-quality' 'topic-code-review' 'topic-codex' 'topic-cursor' 'topic-laravel' 'topic-nodejs' 'topic-react' 'transcript':322 'transit':866 'transition-dur':865 'trap':275 'trigger':29 'true':390,465,477 'tsx':140,830,844 'type':415,736,740 'ui':14,36,125,357,560 'ui/ux':5 'updat':450 'url':421 'usag':779 'use':11,200,351,402,451,621,730,737,780,873 'user':88,497,755 'user-friend':754 'ux':609,752,807,817 'valid':751,757,761,765 'valu':257 'verifi':174 'version':72 'via':246,396 'video':317,493 'visibl':261 'visual':252,384 'vue':144,146 'wai':894 'wai-aria':893 'wcag':34,44,94,327,528,564,685,803,886 'web':2,25,41,56 'web-design-guidelin':1 'web.dev':901,904 'web.dev/accessibility/)':903 'without':271,496 'work':160,573 'www.w3.org':891,899 'www.w3.org/wai/aria/apg/)':898 'www.w3.org/wai/wcag22/quickref/)':890 'x':520,523,526","prices":[{"id":"18fd0574-df1a-43aa-8d2c-51020692dd3f","listingId":"1bba4dff-2291-414b-886c-5c1a83ea7026","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"AsyrafHussin","category":"agent-skills","install_from":"skills.sh"},"createdAt":"2026-05-16T18:57:15.463Z"}],"sources":[{"listingId":"1bba4dff-2291-414b-886c-5c1a83ea7026","source":"github","sourceId":"AsyrafHussin/agent-skills/web-design-guidelines","sourceUrl":"https://github.com/AsyrafHussin/agent-skills/tree/main/skills/web-design-guidelines","isPrimary":false,"firstSeenAt":"2026-05-16T18:57:15.463Z","lastSeenAt":"2026-05-18T18:58:25.860Z"}],"details":{"listingId":"1bba4dff-2291-414b-886c-5c1a83ea7026","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"AsyrafHussin","slug":"web-design-guidelines","github":{"repo":"AsyrafHussin/agent-skills","stars":39,"topics":["agent-rules","agent-skills","ai-agents","ai-slop","claude-code","code-quality","code-review","codex","cursor","laravel","nodejs","react","technical-debt","typescript","windsurf"],"license":"mit","html_url":"https://github.com/AsyrafHussin/agent-skills","pushed_at":"2026-05-16T19:24:02Z","description":"Agent skills for AI coding agents (Claude Code, Cursor, Codex, Windsurf) — Laravel, React, TypeScript, MySQL, code quality, technical debt, documentation, and security.","skill_md_sha":"2378263122c23cd8e5621618244704dc279fe093","skill_md_path":"skills/web-design-guidelines/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/AsyrafHussin/agent-skills/tree/main/skills/web-design-guidelines"},"layout":"multi","source":"github","category":"agent-skills","frontmatter":{"name":"web-design-guidelines","license":"MIT","description":"UI/UX best practices and accessibility audit. Use when reviewing UI code, checking accessibility, running accessibility audits, auditing forms, or ensuring web interface best practices. Triggers on \"audit accessibility\", \"check WCAG\", \"review UI\", \"check accessibility\", \"audit design\", \"review UX\", or \"check best practices\"."},"skills_sh_url":"https://skills.sh/AsyrafHussin/agent-skills/web-design-guidelines"},"updatedAt":"2026-05-18T18:58:25.860Z"}}