android
Material Design 3 and Android platform guidelines. Use when building Android apps with Jetpack Compose or XML layouts,…
Web platform design and accessibility guidelines. Use when building web interfaces, auditing accessibility, implementing responsive layouts, or reviewing web UI code. Triggers on tasks involving HTML, CSS, web components, WCAG compliance, responsive design, or web performance.
Claude Code
$ npx -y skills add ehmo/platform-design-skills --skill web --agent claude-code
Codex
$ npx skills add ehmo/platform-design-skills --skill web -a codex -y
Cursor
$ npx skills add ehmo/platform-design-skills --skill web -a cursor -y
Gemini CLI
$ npx skills add ehmo/platform-design-skills --skill web -a gemini-cli -y
GitHub Copilot
$ npx skills add ehmo/platform-design-skills --skill web -a github-copilot -y
OpenCode
$ npx skills add ehmo/platform-design-skills --skill web -a opencode -y
Windsurf
$ npx skills add ehmo/platform-design-skills --skill web -a windsurf -y
name: web-design-guidelines description: Web platform design and accessibility guidelines. Use when building web interfaces, auditing accessibility, implementing responsive layouts, or reviewing web UI code. Triggers on tasks involving HTML, CSS, web components, WCAG compliance, responsive design, or web performance. license: MIT metadata: author: platform-design-skills version: "1.0.0"
Framework-agnostic rules for accessible, performant, responsive web interfaces. Based on WCAG 2.2, MDN Web Docs, and modern web platform APIs.
---
Accessibility is not optional. Most rules in this section map to WCAG 2.2 success criteria at Level A or AA. A small number of best-practice rules (noted inline) target Level AAA or go beyond WCAG.
Use elements for their intended purpose. Semantic structure provides free accessibility, SEO, and reader-mode support.
| Element | Purpose | |---------|---------| | `<main>` | Primary page content (one per page) | | `<nav>` | Navigation blocks | | `<header>` | Introductory content or navigational aids | | `<footer>` | Footer for nearest sectioning content | | `<article>` | Self-contained, independently distributable content | | `<section>` | Thematic grouping with a heading | | `<aside>` | Tangentially related content (sidebars, callouts) | | `<figure>` / `<figcaption>` | Illustrations, diagrams, code listings | | `<details>` / `<summary>` | Expandable/collapsible disclosure widget | | `<dialog>` | Modal or non-modal dialog boxes | | `<time>` | Machine-readable dates/times | | `<mark>` | Highlighted/referenced text | | `<address>` | Contact information for nearest article/body |
<!-- Good -->
<main>
<article>
<h1>Article Title</h1>
<p>Content...</p>
</article>
<aside>Related links</aside>
</main>
<!-- Bad: div soup -->
<div class="main">
<div class="article">
<div class="title">Article Title</div>
<div class="content">Content...</div>
</div>
</div>**Anti-pattern**: Using `<div>` or `<span>` for interactive elements. Never write `<div onclick>` when `<button>` exists.
Every interactive element must have an accessible name. Prefer visible text; use `aria-label` or `aria-labelledby` only when visible text is insufficient (SC 4.1.2).
<!-- Icon-only button: needs aria-label --> <button aria-label="Close dialog"> <svg aria-hidden="true">...</svg> </button> <!-- Linked by labelledby --> <h2 id="section-title">Notifications</h2> <ul aria-labelledby="section-title">...</ul> <!-- Redundant: visible text is enough --> <button>Save Changes</button> <!-- No aria-label needed -->
All interactive elements must be reachable and operable via keyboard (SC 2.1.1).
// Focus trap for modal
dialog.addEventListener('keydown', (e) => {
if (e.key === 'Tab') {
const focusable = dialog.querySelectorAll(
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
);
const first = focusable[0];
const last = focusable[focusable.length - 1];
if (e.shiftKey && document.activeElement === first) {
e.preventDefault();
last.focus();
} else if (!e.shiftKey && document.activeElement === last) {
e.preventDefault();
first.focus();
}
}
});Never remove focus outlines without providing a visible replacement (SC 2.4.7, enhanced SC 2.4.11 (AA) and SC 2.4.12 (AAA) in WCAG 2.2).
/* Good: custom focus indicator */
:focus-visible {
outline: 3px solid var(--focus-color, #4A90D9);
outline-offset: 2px;
}
/* Remove default only when :focus-visible is supported */
:focus:not(:focus-visible) {
outline: none;
}
/* Bad: removing all focus styles */
/* *:focus { outline: none; } */WCAG 2.2 requires focus indicators to have a minimum area of the perimeter of the component times 2px, with 3:1 contrast against adjacent colors.
Provide a mechanism to skip repeated blocks of content (SC 2.4.1).
<body> <a href="#main-content" class="skip-link">Skip to main content</a> <nav>...</nav> <main id="main-content">...</main> </body>
.skip-link {
position: absolute;
top: -100%;
left: 0;
z-index: 1000;
padding: 0.75rem 1.5rem;
background: var(--color-primary);
color: var(--color-on-primary);
}
.skip-link:focus {
top: 0;
}Every `<img>` must have an `alt` attribute (SC 1.1.1).
<img src="chart.png" alt="Revenue chart: Q1 $2M, Q2 $2.4M, Q3 $3.1M, Q4 $4.5M"> <img src="decorative-wave.svg" alt="">
Maintain minimum contrast ratios (SC 1.4.3, 1.4.6, 1.4.11).
| Content | Minimum Ratio | |---------|--------------| | Normal text (<24px / <18.66px bold) | 4.5:1 | | Large text (>=24px / >=18.66px bold) | 3:1 | | UI components and graphical objects | 3:1 |
Do not rely on color alone to convey information (SC 1.4.1). Pair color with icons, text, or patterns.
/* Check contrast of these tokens */
:root {
--text-primary: #1a1a2e; /* on white: ~16:1 */
--text-secondary: #555770; /* on white: ~6.5:1 */
--text-disabPlatform design skill pack: 450+ rules for Apple HIG, Material Design 3, and WCAG 2.2 across iOS, iPadOS, macOS, watchOS, visionOS, tvOS, Android, and Web.
Material Design 3 and Android platform guidelines. Use when building Android apps with Jetpack Compose or XML layouts,…
Apple Human Interface Guidelines for iPhone. Use when building, reviewing, or refactoring SwiftUI/UIKit interfaces for iOS.…
Apple Human Interface Guidelines for iPad. Use when building iPad-optimized interfaces, implementing multitasking, pointer…
Apple Human Interface Guidelines for Mac. Use when building macOS apps with SwiftUI or AppKit, implementing menu bars, toolbars,…
Apple Human Interface Guidelines for Apple TV. Use when building tvOS apps with focus-based navigation, Siri Remote input, or…
Design banners for social media, ads, website heroes, creative assets, and print. Multiple art direction options with optional…
Use to design, redesign, critique, audit, polish or animate a frontend: websites, landing pages, dashboards, app UI, components,…
Hyperframes-based video template for retro pixel deck motion design. Use when users want a high-fidelity, multi-scene…
Create branded architecture, architecture delta, IT current-state, flowchart, sequence, state machine, ER/data model, timeline,…