polishup-cli 0.0.0-stage → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/.opencode/commands/polishup.md +6 -0
  2. package/LICENSE +21 -0
  3. package/README.md +167 -3
  4. package/cli/detection.mjs +75 -0
  5. package/cli/hosts.mjs +181 -0
  6. package/cli/index.mjs +264 -0
  7. package/cli/installations.mjs +300 -0
  8. package/cli/menu.mjs +124 -0
  9. package/cli/prompts.mjs +166 -0
  10. package/cli/update.mjs +58 -0
  11. package/package.json +60 -6
  12. package/skills/polishup/LICENSE.txt +21 -0
  13. package/skills/polishup/SKILL.md +84 -0
  14. package/skills/polishup/references/code/implementation.md +43 -0
  15. package/skills/polishup/references/code/index.md +13 -0
  16. package/skills/polishup/references/code/rules.md +24 -0
  17. package/skills/polishup/references/colors.md +65 -0
  18. package/skills/polishup/references/research.md +50 -0
  19. package/skills/polishup/references/tools.md +57 -0
  20. package/skills/polishup/references/ui-ux/accessibility.md +136 -0
  21. package/skills/polishup/references/ui-ux/art-direction.md +127 -0
  22. package/skills/polishup/references/ui-ux/audio-and-video.md +121 -0
  23. package/skills/polishup/references/ui-ux/data-visualization.md +130 -0
  24. package/skills/polishup/references/ui-ux/design-ethics.md +98 -0
  25. package/skills/polishup/references/ui-ux/design-evaluation.md +123 -0
  26. package/skills/polishup/references/ui-ux/design-systems.md +110 -0
  27. package/skills/polishup/references/ui-ux/foundations.md +23 -0
  28. package/skills/polishup/references/ui-ux/index.md +29 -0
  29. package/skills/polishup/references/ui-ux/information-architecture.md +132 -0
  30. package/skills/polishup/references/ui-ux/interaction-design.md +155 -0
  31. package/skills/polishup/references/ui-ux/motion-design.md +110 -0
  32. package/skills/polishup/references/ui-ux/performance.md +109 -0
  33. package/skills/polishup/references/ui-ux/responsive-design.md +98 -0
  34. package/skills/polishup/references/ui-ux/rules.md +36 -0
  35. package/skills/polishup/references/ui-ux/ux-research.md +110 -0
  36. package/skills/polishup/references/ui-ux/visual-design.md +147 -0
  37. package/skills/polishup/references/writing/accessibility-and-inclusion.md +57 -0
  38. package/skills/polishup/references/writing/content-and-evidence.md +83 -0
  39. package/skills/polishup/references/writing/content-structure.md +94 -0
  40. package/skills/polishup/references/writing/foundations.md +19 -0
  41. package/skills/polishup/references/writing/index.md +17 -0
  42. package/skills/polishup/references/writing/language-and-style.md +83 -0
  43. package/skills/polishup/references/writing/multilingual-writing.md +51 -0
  44. package/skills/polishup/references/writing/purpose-audience-context.md +72 -0
  45. package/skills/polishup/references/writing/review-and-revision.md +81 -0
  46. package/skills/polishup/references/writing/rules.md +26 -0
  47. package/skills/polishup/references/writing/voice-and-tone.md +72 -0
  48. package/skills/polishup/scripts/NOTICE.txt +27 -0
  49. package/skills/polishup/scripts/color.mjs +5626 -0
@@ -0,0 +1,65 @@
1
+ # Color Tools
2
+
3
+ Use for pair calculations, named harmony exploration, or adapting explicit color roles. Preserve established palettes unless changes are requested or a scoped defect justifies them. Use [Visual Design](ui-ux/visual-design.md) for color decisions and [Data Visualization](ui-ux/data-visualization.md) for data scales. No calculator establishes good design or complete accessibility.
4
+
5
+ ## Availability
6
+
7
+ The complete skill includes a prepared helper at [scripts/color.mjs](../scripts/color.mjs), with Color.js already bundled and its [license notice](../scripts/NOTICE.txt). It needs Node.js 22+ and script execution, with no npm installation, global command, Python, MCP, model or network call. The Markdown guidance remains usable without Node. Reuse an adequate available checker if execution is unavailable; report any remaining gap without installing software automatically.
8
+
9
+ Resolve the installed skill directory from the harness or the file being read. Run the prepared helper rather than loading its bundled implementation into context as instructions. From any working directory:
10
+
11
+ ```text
12
+ node "<absolute-skill-path>/scripts/color.mjs" check "#222222" "#ffffff" --json
13
+ node "<absolute-skill-path>/scripts/color.mjs" generate --input "<palette.json>" --json
14
+ ```
15
+
16
+ Keep caller-relative input paths relative to the caller. Do not assume package-cache locations. The optional `polishup-cli` package exposes the same helper through `polishup color ...` or `node "<package>/cli/index.mjs" color ...`. Complete manual, native and installer copies carry the helper; reading instructions alone does not supply file access or a runtime.
17
+
18
+ ## Check a pair
19
+
20
+ `color check <foreground> <background>` compares opaque color literals within sRGB. The default minimum is 4.5, a normal-text starting point with applicable standard exceptions. `--minimum <ratio>` accepts a custom number from 1 to 21; supplying a number does not establish standards applicability. Determine that from the actual role, text and context.
21
+
22
+ The helper retains inputs and calculates the ratio before display rounding. Transparency, unresolved CSS expressions/channels and unsupported wide-gamut contexts are incomplete; malformed inputs are errors. It does not composite a page, test rendered states or alter supplied colors to make them pass.
23
+
24
+ ## Generate candidates
25
+
26
+ Provide JSON through `--input <file>`, or pipe it with `--input -`. The 1 MiB input, 64-role and 128-pair limits bound execution, not palette design. Unknown fields and invalid role/pair references are rejected.
27
+
28
+ For harmony exploration:
29
+
30
+ ```json
31
+ { "base": "#3366cc", "scheme": "triadic" }
32
+ ```
33
+
34
+ Schemes: `monochromatic`, `analogous`, `complementary`, `split-complementary`, `triadic`. Without a scheme, a supplied base uses monochromatic. Monochromatic samples retain the base and interpolate 35% toward white/black in OKLab. Others rotate OKLCH hue by offsets recorded in the report. These are exploration conventions, not obligatory UI roles or an exact RYB wheel. Neutral bases cannot provide meaningful chromatic harmony. A hue scheme alone has no checked role pairs.
35
+
36
+ For explicit role adjustment:
37
+
38
+ ```json
39
+ {
40
+ "schemaVersion": 1,
41
+ "mode": "light",
42
+ "roles": {
43
+ "surface": { "color": "#ffffff", "locked": true },
44
+ "action": { "color": "#bbbbbb" },
45
+ "actionText": { "color": "#ffffff", "locked": true }
46
+ },
47
+ "pairs": [
48
+ { "foreground": "actionText", "background": "action", "minimum": 4.5 }
49
+ ]
50
+ }
51
+ ```
52
+
53
+ Keep project names and declare only needed relationships. Each pair needs an explicit minimum. Locked colors and passing roles are retained. `mode` labels context without inverting colors or creating another theme. A base/scheme may accompany roles, but harmony swatches do not automatically replace role seeds.
54
+
55
+ Unlocked failing roles are searched along a defined OKLCH lightness curve. Sampling identifies pass/fail boundaries for bounded refinement; generated six-digit sRGB colors are checked again after mapping and serialization. The helper selects the closest passing sampled candidate in OKLab distance with stable ordering. Its report records settings and limitations. This is not a global solution or proof of brand preservation. Coupled constraints can remain unmet; this does not prove no other solution exists.
56
+
57
+ Use approved brand data first. Logo/image candidates require an available asset-reading tool; these helpers do not decode images, parse SVG/token systems or identify official brand colors. Do not give a monochrome logo an invented hue. Select sequential, diverging or categorical data palettes with appropriate data guidance/tools instead of applying brand harmonies mechanically.
58
+
59
+ ## Preview and results
60
+
61
+ `--preview <new-file.html>` writes a static local preview only when requested. Existing files are not overwritten. The preview has escaped labels, swatches and declared pairs, with no external assets or scripts. Locked fractional colors retain their sRGB coordinates. It is a proposal, not a production UI or audit. Inspect it visually when useful and supported; creating the file does not prove it was viewed.
62
+
63
+ `--json` returns one report with method/version, values, checks, parameters and limits. Exit codes: 0 for completion without failed/incomplete requested checks; 1 for a failed target; 2 for input/dependency/execution errors; 3 for incomplete checks without confirmed failure. A harmony-only `generated` report has no contrast pass. Failure plus incomplete uses exit 1 and retains both outcomes. Read the report as well as the exit code.
64
+
65
+ Applicability: [W3C contrast explanation](https://www.w3.org/WAI/WCAG22/Understanding/contrast-minimum.html). Calculation and mapping: [Color.js](https://colorjs.io/). A helper result or library method name does not establish full WCAG conformance.
@@ -0,0 +1,50 @@
1
+ # Task Research
2
+
3
+ Use for unfamiliar fields, uncertain quality criteria, conflicting evidence, or material gaps in task research. The root skill requires initial research; this reference explains how to make it useful. It does not supply specialist expertise or require a separate report, fixed source count, or new tools.
4
+
5
+ ## Establish context
6
+
7
+ Inspect the brief and relevant existing work. Identify the deliverable, audience or users, intended use, requested action, constraints, and what must remain unchanged. Check the medium, destination, software version, and available capabilities when they affect the method or result.
8
+
9
+ Separate stated requirements, observed conditions, assumptions, and unresolved choices. Ask when a consequential gap has no defensible default; otherwise state material assumptions and continue. Public research cannot establish a private preference or authorize a redesign. For a source-only transformation, research the method without adding outside facts to the transformed content.
10
+
11
+ ## Research methods and failure modes
12
+
13
+ Start from the task and the decisions it requires. Look for applicable professional methods, quality criteria, standards, and relevant examples. Investigate concrete failures alongside successful practice, including documented AI-output problems. Do not frame every query to confirm that a pattern is bad. If the field lacks reliable AI-slop research, use established failure criteria without inventing a blacklist or claiming prevalence.
14
+
15
+ Choose sources for their role:
16
+
17
+ - Official documentation establishes supported behavior, requirements, and version-specific methods.
18
+ - Original research or a sound synthesis supports findings within its methods, population, and conditions.
19
+ - Professional guidance and first-hand case studies offer methods and trade-offs; one successful project does not establish a universal optimum.
20
+ - Reviews and community reports can reveal recurring concerns. Check their examples and context before generalizing.
21
+ - Galleries and reference work show possibilities and visual choices, not proof of usability, correctness, or effectiveness.
22
+
23
+ Open the relevant content rather than relying on search snippets or generated summaries. Check authorship, evidence, dates, applicable versions, and important limitations. Use current sources for changing practice; retain older fundamentals when still applicable. A recently updated page may describe an experimental version rather than the target environment. Compare consequential disagreements and trace repeated claims to their original evidence. For deeper source assessment, use [Content & Evidence](writing/content-and-evidence.md#evaluate-sources).
24
+
25
+ Use suitable connected tools or official documentation through native search/browser tools. Keep private material and credentials out of external queries. Do not install software, contact participants, publish experiments, or upload artifacts merely to satisfy a research step without authorization.
26
+
27
+ ## Turn findings into decisions
28
+
29
+ Translate material findings into the method to use, why it fits, constraints or exceptions, and what to check. Distinguish a requirement from a heuristic or aesthetic preference. Retain source links and version context where they support consequential decisions or useful follow-up, without attaching a bibliography to every minor edit.
30
+
31
+ Compare meaningfully different approaches when the brief leaves an important choice open. Do not generate variants for a settled direction or imitate an entire reference. Preserve existing identity and conventions unless changing them is within scope. Modern methods can support traditional, expressive, restrained, or experimental work.
32
+
33
+ Examples of task-specific decisions:
34
+
35
+ | Task | Research and check |
36
+ | --- | --- |
37
+ | A 3D asset | Intended use and destination determine topology, materials, lighting, and delivery checks. A still render does not establish suitability for deformation or real-time use |
38
+ | A data analysis | Establish data definitions, missingness, units, comparison, and assumptions before choosing a method. Verify calculations and interpretation; polished charts do not establish a valid conclusion |
39
+ | Learning material | Match explanations, examples, and practice to learner knowledge and objectives. Check correctness and alignment; readability alone does not establish learning outcomes |
40
+ | A narrow UI repair | Verify relevant guidance, then check the affected component and states. Research does not justify replacing the visual identity or building a design system |
41
+
42
+ These examples identify research questions, not complete domain instructions. For high-stakes work, use applicable specialist standards and review; do not imply professional assurance that the evidence cannot support.
43
+
44
+ ## Check the actual result
45
+
46
+ Use checks appropriate to the artifact, scope, and available tools: inspect rendered output, exercise behavior, calculate results, compare with source material, or review against explicit criteria. Preserve meaning, required behavior, and satisfactory work. Address concrete defects before cosmetic preferences.
47
+
48
+ Keep claims separate: a source was read, a method was chosen, an artifact was produced, and its behavior was tested are different observations. Report consequential gaps. A screenshot cannot establish interaction behavior; an attractive render cannot establish the quality of hidden geometry; source verification cannot establish user outcomes.
49
+
50
+ Follow-up research should answer a remaining question rather than repeat the initial search. Stop when the requested result has adequate support and proportionate checks. If access fails, retry transient failures within reasonable bounds or use another suitable source. If evidence remains unavailable, narrow, qualify, defer, or ask about the affected decision while completing independent supported work. Never invent research, measurements, currentness, or validation.
@@ -0,0 +1,57 @@
1
+ # Tools and Verification
2
+
3
+ Use when a task needs artifact inspection, executable checks, or an unavailable capability. Select tools by the question they can answer. This reference adds no required provider, setup document, or full-audit workflow. Use [Task Research](research.md) for research decisions and the relevant domain reference for quality criteria.
4
+
5
+ ## Reuse project context
6
+
7
+ Inspect the target and relevant instructions, components, styles, terminology, contracts, and check commands. Distinguish documented decisions, observed conventions, and assumptions. An undocumented project still has work worth preserving. Resolve consequential conflicts; do not turn a local repair into a redesign.
8
+
9
+ Reuse existing project documents. Record missing durable decisions only when requested or within an authorized setup task, in an existing suitable location. Session summaries and inferred preferences are fallible context. Do not require new configuration or copy the whole repository into context.
10
+
11
+ ## Select available capabilities
12
+
13
+ | Need | Useful capability | Limit |
14
+ | --- | --- | --- |
15
+ | Current methods or API behavior | Documentation, search, or source retrieval | Read the source; a search snippet is not verification |
16
+ | Intended design | Design-file inspection | Does not establish delivered behavior |
17
+ | Rendered appearance | Relevant screenshot plus geometry and computed styles | Capture alone is not visual inspection |
18
+ | Interaction and states | Browser or equivalent interactive tools | Verify the actual route, not just a visible control |
19
+ | Accessibility | Suitable automated checks plus relevant manual routes | A clean scan does not establish full conformance |
20
+ | Code behavior | Project lint, type checks, and focused tests | A passing check covers only its assertions |
21
+ | Writing conventions | Project terminology/style checks and contextual review | Rules do not establish facts or authorship |
22
+ | Other artifacts | Appropriate native or specialist tools | Do not force a browser or bundled domain onto unrelated work |
23
+
24
+ Use an adequate existing tool before adding an equivalent. A CLI cannot universally discover a harness's private tools. Do not install software, register MCP servers, or change configuration merely because an optional check is unavailable. Report the gap and continue supported work. Run a helper only when its actual location, runtime, inputs, and side effects are known; bundled resources still need a supported execution capability.
25
+
26
+ ## Inspect a focused UI target
27
+
28
+ Identify the page/component, state, viewport and relevant content. Collect only what answers the question: screenshot region, bounds, padding/gap, typography, effective color pairs, overflow, or interaction observations. Reuse an available style/evaluation capability for repeated measurements; do not build a browser or inject source overlays for an ordinary review.
29
+
30
+ Compare equivalent roles against project conventions. Different values may reflect intentional variants. A computed font stack does not identify every fallback glyph; source declarations do not prove rendering. Inspect screenshots when visual judgment is needed and supported. Keep unviewed captures and untested behavior explicitly unverified.
31
+
32
+ Preserve the original state. Use an owned session or an authorized preview when changes to viewport, content or media settings are needed. Restore temporary settings and close only owned resources. Do not silently hide overlays or edit source to improve a review result.
33
+
34
+ ## Choose checks for the task
35
+
36
+ Select conditions that could change the result; avoid every theoretical combination:
37
+
38
+ - Layout/content: narrow space, longer realistic text, missing or dense data, relevant locale and direction, text enlargement, or spacing overrides. Check loss of information and actions. Intentional scrolling or accessible truncation is not automatically a defect.
39
+ - Interaction: relevant keyboard/pointer routes, focus transitions, menus/dialogs, validation, loading, empty/error states, and recovery. Exercise hidden states before scanning them. An ARIA snapshot alone does not establish keyboard or screen-reader usability.
40
+ - Motion/media: relevant playback, interruption, reduced-motion and available controls. A static screenshot cannot verify motion.
41
+ - Performance: investigate observed loading, response or stability problems with available measurements. Distinguish controlled local results from real-user data.
42
+
43
+ Use [Responsive Design](ui-ux/responsive-design.md) and [Accessibility](ui-ux/accessibility.md) for applicability and exceptions. Device pixel ratio, viewport emulation, browser zoom and actual-device testing are different checks. WCAG text-spacing values describe user-override resilience, not mandatory authored typography. Keep synthetic fixtures temporary and labeled; retain genuine delivered content.
44
+
45
+ ## Verify changes and report evidence
46
+
47
+ Compare the affected before/after work or use a suitable native diff. The whole worktree diff need not belong to this task. Preserve identity and useful interactions, Writing meaning/facts/protected text, and Code contracts within the requested scope. Investigate differences before normalizing them. Use [Design Evaluation](ui-ux/design-evaluation.md), [Writing Review](writing/review-and-revision.md), or project checks for deeper decisions.
48
+
49
+ Report location, conditions, observation, applicable criterion, consequence and a useful next action. Separate confirmed defects, potential problems, trade-offs and preferences. For executable checks distinguish pass, fail, incomplete, not-applicable and execution errors; report what was not checked. Never convert missing evidence into a pass or a guessed quality score.
50
+
51
+ Recheck the changed target and affected shared behavior proportionately. Stop when the requested outcome is met. Avoid repeating unchanged checks or starting benchmarks and additional model reviews without an agreed need.
52
+
53
+ ## Optional color helpers
54
+
55
+ The skill carries a prepared Node helper for provided color pairs, palette candidates and an optional preview. Read [Color Tools](colors.md) for invocation, inputs and limits. No global CLI or npm dependencies are needed to execute it. These calculations do not inspect a rendered page or decode images. If the harness cannot run the helper, use an adequate available checker or report the missing check.
56
+
57
+ Operational references: [Playwright emulation](https://playwright.dev/docs/emulation), [axe API](https://github.com/dequelabs/axe-core/blob/develop/doc/API.md), and [W3C text-spacing explanation](https://www.w3.org/WAI/WCAG22/Understanding/text-spacing.html). Verify actual tool/version support before relying on a particular operation.
@@ -0,0 +1,136 @@
1
+ # Accessibility
2
+
3
+ Use to identify access barriers, support assistive technologies, apply relevant standards, or check accessibility. Read the needed sections; a local repair does not require a full conformance audit.
4
+
5
+ ## Contents
6
+
7
+ - [Access barriers](#identify-access-barriers) and [applicable standards](#choose-the-applicable-standard)
8
+ - [Visual information](#make-visual-information-accessible)
9
+ - [Structure and labels](#specify-accessible-structure-and-labels), [control semantics](#choose-control-semantics)
10
+ - [Input and focus](#support-input-and-focus), [cognitive barriers](#reduce-cognitive-barriers)
11
+ - [Motion and media alternatives](#plan-motion-and-media-alternatives)
12
+ - [Checks](#choose-accessibility-checks), [user participation](#include-users-with-varied-needs), and [findings](#prioritize-and-report-barriers)
13
+
14
+ ## Identify access barriers
15
+
16
+ Identify what people must perceive, understand, operate, and complete, including sign-in, help, and correction. Look for unnecessary dependence on sight, hearing, fine movement, memory, speed, or one input method.
17
+
18
+ | Barrier | Design response to investigate |
19
+ | --- | --- |
20
+ | Meaning depends on color, position, image, or animation | Equivalent meaning through text, structure, semantics, or another usable presentation |
21
+ | Fine movement, dragging, holding, or rapid actions | Operable controls, alternatives, suitable targets, and manageable effort |
22
+ | Memory, unfamiliar instructions, or disappearing information | Persistent context, clear next actions, assistance, timing, and recovery |
23
+ | Essential audio | Suitable visible/textual access and playback control |
24
+ | Motion, flashes, or competing sensory feedback | Reduced interference, appropriate control, and separate standards checks |
25
+
26
+ Use project requirements and relevant user evidence. Ask about a functional need rather than a diagnosis. Do not infer ability or preferred assistance from identity. Preserve technical depth, dignity, and expression; inclusion does not require one sparse layout or infantilizing language.
27
+
28
+ ## Choose the applicable standard
29
+
30
+ Identify product, platform, version, conformance level, and scope when a standard affects the task. For web design without a declared target, use [WCAG 2.2 A and AA](https://www.w3.org/TR/WCAG22/) as a practical baseline, then check applicable project requirements and user needs. A different declared target needs its own assessment. Recheck publication status and relevant errata when version changes matter; a draft is not an adopted requirement.
31
+
32
+ | Authority | Use and limit |
33
+ | --- | --- |
34
+ | WCAG 2.2 | Published Recommendation with normative web-content criteria. AA includes A and AA; AAA is not automatically required for AA |
35
+ | [WCAG 3](https://www.w3.org/WAI/standards-guidelines/wcag/wcag3-intro/) | Work in progress, not the production conformance baseline. At the 2026-11-13 check, the latest published version was the 2026-09-10 Working Draft. Do not replace WCAG 2 requirements or mix draft tests into a WCAG 2 claim |
36
+ | [WAI-ARIA](https://www.w3.org/TR/wai-aria-1.2/) and [ARIA in HTML](https://www.w3.org/TR/html-aria/) | Define accessibility semantics and their permitted use with HTML. ARIA 1.2 is a Recommendation; 1.3 remained a Working Draft at the same check. These are not substitutes for WCAG, keyboard behavior, or tested support |
37
+ | Understanding, techniques, and ARIA APG | Informative explanations and approaches, not extra criteria or proof of implementation |
38
+ | [WCAG2ICT](https://www.w3.org/TR/wcag2ict-22/) | Informative application guidance for non-web documents/software, not a separate native-app conformance standard |
39
+ | [Making Content Usable](https://www.w3.org/TR/coga-usable/) | Supplemental cognitive-access guidance, not additional mandatory WCAG criteria |
40
+ | Platform guidelines | Platform behavior and recommendations; units and rules cannot be substituted into web criteria indiscriminately |
41
+
42
+ A contract, procurement requirement, or jurisdiction may identify another target. Verify it when material; a style guide does not establish legal compliance.
43
+
44
+ Draft guidance can inform clearly labeled exploration; assess conformance against the applicable published target.
45
+
46
+ Conformance covers defined full pages and complete processes, relevant responsive variants, and relied-on technology. One component, color check, or successful step cannot establish it. Mark a criterion applicable, inapplicable with a reason, or untested as supported.
47
+
48
+ ## Make visual information accessible
49
+
50
+ Distinguish text, essential controls/states, meaningful graphics, and decoration. Use [Visual Design's contrast and reading-flexibility requirements](visual-design.md#standards-and-reading-flexibility) and [Responsive Design](responsive-design.md) for enlargement and changing space.
51
+
52
+ Do not communicate an important distinction only through hue, position, or visual change. Pair it with usable labels, shapes, patterns, or semantic relationships. Two differently colored badges with the same spoken name still leave a nonvisual gap.
53
+
54
+ Inspect relevant states, themes, images behind text, and user settings. A dark palette, screenshot estimate, or color-vision simulation does not establish every contrast requirement. Preserve identity while repairing the failing relationship.
55
+
56
+ ## Specify accessible structure and labels
57
+
58
+ Specify what each important element is, its name, state/value, relationships, and changes. Headings, regions, groups, lists, tables, field instructions, and errors need meaningful delivered structure. Bold text is not automatically a heading; aligned numbers do not automatically form an accessible table.
59
+
60
+ Prefer suitable native controls and HTML semantics for web work. Add ARIA where needed to express missing meaning, rather than putting roles and labels on everything. A custom control needs its expected name, role, state, relationships, keyboard behavior, and compatibility checks. [ARIA APG](https://www.w3.org/WAI/ARIA/apg/practices/read-me-first/) explains that a role alone does not add behavior and overrides can remove useful meaning. Its examples require testing with the relevant browsers, assistive technologies, and touch/mobile conditions before production use.
61
+
62
+ Coordinate reading order, focus order, and visual emphasis. They need not have identical pixel order. Static content need not all be keyboard-focusable for screen-reader reading. WCAG 2.4.3 Focus Order, A, preserves meaning and operability where order matters; more than one sequence can work.
63
+
64
+ ### Choose control semantics
65
+
66
+ Follow [APG keyboard conventions](https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/) and the relevant component pattern when designing a custom composite control. Tab usually moves between components; the appropriate pattern defines movement within a menu, tab set, listbox, or grid. Do not make every cell or decorative element a separate tab stop by default.
67
+
68
+ - Ordinary site navigation can use links and disclosure controls; a visual dropdown does not automatically require application-menu semantics.
69
+ - A readable data table and an interactive grid have different behavior. Choose grid semantics only when the task needs that interaction and its keyboard support can be supplied.
70
+ - Keep exposed states synchronized with actual expansion, selection, checking, or operation. An annotation or ARIA attribute does not implement the behavior.
71
+ - Give controls a usable name and associate needed help or errors. Avoid overriding visible wording with an unrelated or unnecessarily verbose name, or hiding a usable control from assistive technology while leaving it keyboard-focusable.
72
+
73
+ For updates, distinguish routine status from an urgent alert. Preserve a way to inspect important messages, avoid announcing every increment, and do not move focus merely to announce progress. Use [Interaction Design](interaction-design.md#give-accurate-feedback) for feedback and deliberate focus changes. Check actual accessibility information and behavior; annotations describe intended support.
74
+
75
+ These semantics apply to the web. Native interfaces need equivalent platform support. UI/UX specifies meaning, operation, and focus behavior; Engineering implements them. A mockup can describe requirements but cannot prove they work.
76
+
77
+ ## Support input and focus
78
+
79
+ Provide required functions through supported keyboard and alternative input paths. A hidden gesture, hover, precision, or rapid sequence should not be the sole route. Reuse [Interaction's criteria](interaction-design.md#accessibility-requirements-and-pattern-guidance) and [Input methods](responsive-design.md#support-different-input-methods).
80
+
81
+ Keep focus perceivable and logically managed when elements open, close, disappear, or change presentation. Focus is not selection or activation. Do not trigger an unexpected consequential context change merely on focus.
82
+
83
+ Distinguish 2.4.7 Focus Visible, AA; 2.4.11 Focus Not Obscured (Minimum), AA; and 2.4.13 Focus Appearance, AAA. A preferred ring style is not the only valid pattern, and AAA geometry must not be presented as an AA requirement.
84
+
85
+ For labeled controls, 2.5.3 Label in Name, A, requires the accessible name to contain the visible label text, including images of text. An unrelated hidden label can obstruct speech input.
86
+
87
+ Consider effort, not just theoretical reachability. Support bypassing repeated regions and reaching important structure. A keyboard route alone does not satisfy the single-pointer dragging alternative. A screen-reader user need not use a desktop keyboard.
88
+
89
+ ## Reduce cognitive barriers
90
+
91
+ Make the task, required information, next action, consequences, and recovery clear. Use [Accessibility & Inclusive Writing](../writing/accessibility-and-inclusion.md) for language and equivalent meaning and [Information Architecture](information-architecture.md) for orientation.
92
+
93
+ Keep instructions available rather than relying on placeholders or recall. Preserve valid entries after errors. Place repeated help predictably where relevant. Give appropriate warning, time, extension, or recovery under the applicable timing criterion and actual constraints.
94
+
95
+ Offer useful optional assistance without making a separate accessibility mode the only operable route. Cognitive guidance does not require pictures everywhere, one-screen steps, or removing technical depth.
96
+
97
+ Inspect authentication and recovery for memory, transcription, puzzle, and device dependencies. Under WCAG 3.3.8 Accessible Authentication (Minimum), AA, a step must not require a cognitive-function test unless it supplies a permitted alternative or assistance, or meets the object-recognition or personal-content exception. Support password managers and copy/paste where appropriate; the criterion does not ban passwords or require one technology. Multi-factor and recovery authentication steps also need attention. An allowed exception may still leave unmet needs. Do not weaken security or promise unsupported recovery.
98
+
99
+ ## Plan motion and media alternatives
100
+
101
+ Keep essential meaning available without one sensory channel or effect. Sound or haptics can supplement a visible message, but neither is a universal substitute.
102
+
103
+ | Concern | WCAG boundary |
104
+ | --- | --- |
105
+ | Interaction-triggered motion | 2.3.3, AAA: motion animation can be disabled unless essential |
106
+ | Automatic movement or updating | 2.2.2, A: moving/blinking/scrolling information that starts automatically, lasts over five seconds, and accompanies other content needs pause/stop/hide unless essential. Automatic updates alongside other content need pause/stop/hide or update-frequency control unless essential, without the five-second condition |
107
+ | Flashes | 2.3.1, A: no more than three flashes in any one-second period, or below the defined general/red-flash thresholds |
108
+ | Automatic audio | 1.4.2, A: audio playing for more than three seconds needs pause/stop or volume control independent of system volume |
109
+
110
+ Inspect the full criterion, exceptions, and actual presentation when compliance matters. Reduced motion, short duration, or a pause control does not establish flash safety. A still image cannot verify a flashing sequence.
111
+
112
+ Use [Motion Design](motion-design.md) to specify a complete reduced alternative that preserves task, status, and context. Use [Audio & Video](audio-and-video.md#plan-media-accessibility) for live/prerecorded and audio/video distinctions, captions, transcripts, and audio description. Writing supplies faithful alternatives; Engineering verifies timing, semantics, and delivery. Do not invent descriptions of unavailable media.
113
+
114
+ ## Choose accessibility checks
115
+
116
+ Use [Design Evaluation](design-evaluation.md#match-checks-to-available-evidence) for general artifact limits. For access questions, inspect the specific route: contrast, keyboard, zoom, accessibility information, screen-reader operation, media alternatives, or task completion.
117
+
118
+ Use automated findings to guide inspection. No reported errors means only that the tool detected none in that run. A score is neither the percentage of people served nor proof of WCAG conformance. Widgets and automated fixes do not replace checking the actual experience.
119
+
120
+ Test affected tasks and plausible regressions for a focused change. For a requested broader assessment, [WCAG-EM 2.0](https://www.w3.org/TR/wcag-em-2/) can frame scope, states, sampling, and reporting. It is an evaluation method, not extra criteria or a mandatory stage. A sampled assessment alone does not justify a whole-product claim.
121
+
122
+ ## Include users with varied needs
123
+
124
+ Combine relevant [disabled-user evaluation](https://www.w3.org/WAI/test-evaluate/involving-users/) with standards assessment; neither replaces the other.
125
+
126
+ For authorized research, make recruitment, consent, tasks, session tools, communication, timing, and feedback channels usable. Support relevant assistive setups, breaks, privacy, and compensation. Distinguish a product barrier from an inaccessible research method or unfamiliar setup.
127
+
128
+ One person or disability group cannot represent everyone. Simulations and model-generated personas do not replace evidence from people with those needs.
129
+
130
+ ## Prioritize and report barriers
131
+
132
+ Prioritize blocked tasks, trapped interaction, hidden commitments, lost work, and absent usable alternatives. Consider impact, reach, and frequency separately from confidence. Conformance level is not a severity ranking.
133
+
134
+ Repair the cause: a hidden label cannot fix wrong behavior, and simpler copy cannot create a missing recovery route. Preserve effective content and supports.
135
+
136
+ Report location/state, task or access route, observation, applicable need or criterion, proposed repair, and remaining verification. Distinguish observed failure, potential barrier, intended support, and unperformed checks. Include relevant platform/tool versions for behavioral evidence. A finding that mockup states differ only by color can be supported without claiming uninspected runtime semantics.
@@ -0,0 +1,127 @@
1
+ # Art Direction
2
+
3
+ Use to establish or compare visual concepts, research inspiration, select imagery, adapt crops, or check representation and reuse. [Visual Design](visual-design.md) covers hierarchy and layout; [UX Research](ux-research.md) covers unresolved product needs.
4
+
5
+ ## Define visual direction
6
+
7
+ Reuse purpose, primary tasks, audience, real content, identity, platform, and delivery constraints. Preserve an established direction except for changes within the requested scope; a mismatch can justify a repair or a proposal for wider work. Judge the specific surface: the same product's marketing page, work dashboard, documentation, and gallery can need different density, emphasis, and expression.
8
+
9
+ Translate vague adjectives into observable choices. "Professional" or "modern" does not specify a restrained palette, sparse layout, or enterprise style. Connect intended character to content, imagery, type, density, and interaction, using relevant audience, language, and cultural context. Do not assign a palette, typeface, or layout solely from an industry label.
10
+
11
+ Apply [PolishUp's default pattern restrictions](rules.md) when choosing a new direction. Do not select an excluded preset because a gallery features it or it seems appropriate without user direction. Preserve the requested or relevant existing identity; adapt its execution rather than reopening settled choices.
12
+
13
+ When direction is missing, choose a coherent relationship between content order, layout, type, color, density, assets, and interaction before repeating significant visual choices. Explain important choices in the existing deliverable when useful; no separate brief or token catalog is required. A small component repair needs no new identity, moodboard, or competitor study.
14
+
15
+ ## Research visual references
16
+
17
+ Identify the unresolved question before browsing: explaining an unfamiliar workflow, showing product scale, communicating atmosphere, or adapting identity across formats. Search comparable tasks, audiences, platforms, and constraints. A generic search for "modern SaaS" rarely establishes those requirements.
18
+
19
+ | Source | Useful contribution | Limit |
20
+ | --- | --- | --- |
21
+ | Live product or recorded flow | Content, patterns, interactions, and observable states | Production use does not prove effectiveness; recordings may omit paths or be outdated |
22
+ | Studio or brand case study | Stated intent, constraints, and coordinated execution | Selective presentation and promotional outcome claims |
23
+ | Gallery, award entry, or concept | Visual alternatives worth exploring | May omit real content, states, access, and delivery; awards do not establish task success |
24
+ | User study | Evidence within its tasks and methods | Not a universal visual formula |
25
+ | Project system | Local conventions and assets | Not automatically suitable for another product |
26
+
27
+ Choose a source by the question; these are starting points, not a required browsing list.
28
+
29
+ | Place to look | Use for | Check before adapting |
30
+ | --- | --- | --- |
31
+ | [Mobbin](https://mobbin.com/) | Shipped web/mobile screens and multi-step product flows | Capture date, platform, adjacent states, and access limits |
32
+ | [Lapa Ninja](https://www.lapa.ninja/) | Landing-page composition and product communication | Actual live page and content fit; archived versions may differ |
33
+ | [Awwwards](https://www.awwwards.com/) | Expressive websites, art direction, and motion possibilities | Task suitability, readability, responsive behavior, and interaction cost |
34
+ | [Behance](https://www.behance.net/) | Brand systems, coordinated imagery, and presented case studies | Whether the work shipped and which outcomes are independently supported |
35
+ | [Dribbble](https://dribbble.com/) | Component treatments and visual alternatives | Whether a shot is a concept and whether states, content, and flows are represented |
36
+
37
+ Use actual comparable products for behavior and existing [design-system guidance](design-systems.md) for conventions. Galleries and awards do not establish usability or accessibility. No particular account, subscription, MCP, or tool is required; use accessible alternatives if a source is unavailable. Inspect beyond the thumbnail when possible, retaining the URL and useful creator/version context. Distinguish current behavior from old captures or unshipped concepts; a screenshot cannot prove unshown interaction.
38
+
39
+ For each reference that shapes a decision, note the useful principle, why it fits, and what to exclude. Adapt composition, typography, imagery, or interaction to the project. Do not copy another product's identity or combine incompatible styles.
40
+
41
+ Cross-check consequential disputed choices when another source could change the decision. Stop when more browsing is unlikely to help. If current research is unavailable, use supplied material and stated assumptions; do not claim a survey of current products or invent references.
42
+
43
+ ## Compare visual concepts
44
+
45
+ Compare a small number of genuinely different approaches when the choice matters. Vary a meaningful decision, such as product demonstration versus a service explanation, task sequence, content density, or imagery. Use the same real content and task to compare clarity, identity, access, assets, implementation cost, and maintenance. Color-only variants are useful for a palette decision, not evidence of broader exploration.
46
+
47
+ If an open brief produces near-identical concepts, reconsider composition, density, type, color, and assets together within the allowed direction. Compare a contrasting viable approach when it could change the decision. Replacing an excluded effect with the same generic layout does not establish product fit; novelty alone is not the goal.
48
+
49
+ Use a moodboard to compare lighting, texture, subjects, or visual character. Note what to adopt and exclude. It is not a finished interface or reuse permission. Test promising ideas with real content and placements before choosing them.
50
+
51
+ Avoid anchoring on the first attractive example or assembling unrelated attractive details. Select a direction against requirements and user preferences; check that borrowed ideas still work together with actual content and constrained layouts. Involve the user when an unresolved subjective choice materially changes identity or the experience. Follow a clear brief without another approval round; keep routine reversible choices moving.
52
+
53
+ ## Choose media by purpose
54
+
55
+ Choose what helps people understand, recognize, compare, act, or experience. Atmosphere is a valid purpose; neither imagery in every section nor removing all decoration is a default requirement.
56
+
57
+ | Medium | Useful role | Check |
58
+ | --- | --- | --- |
59
+ | Photography | Actual people, places, materials, products, or intended atmosphere | Context, accuracy, representation, permission, and implied factual claims |
60
+ | Illustration | Abstract relationships, concepts, or character | Suitable metaphor, clear meaning, and no misleading invented detail |
61
+ | Icons | Repeated actions, states, or categories | Recognizability, consistent meaning, actual-size legibility, and needed labels |
62
+ | Diagrams | Relationships, sequence, or mechanisms | Correct labels, direction, scope, and accessible equivalent |
63
+ | Screenshots | Actual interface, feature, or process | Current version, readable focus, real capability, and confidential content |
64
+ | Expressive imagery | Character, pacing, or visual motif | Relevant expression without obstructing work or adding disproportionate cost |
65
+ | Text or no added asset | Direct explanation or action | Whether omitting a visual loses important information or intended expression |
66
+
67
+ A conceptual image cannot prove a product capability. A tiny accurate screenshot may explain little. Keep icon meaning stable; use a familiar action pattern when a novel silhouette obscures the control. Mixed media can work when their relationship is coherent. Use [Audio & Video](audio-and-video.md) when playback, sound, or time-based interaction needs guidance.
68
+
69
+ Judge the rendered artwork rather than its file format. Do not pass rough assembled scenes, unfinished marks, or a text description off as finished product imagery or a working demo. Preserve useful SVG artwork, diagrams, intentional avatar fallbacks, and honestly scoped prototypes. If a required asset is unavailable, identify the gap instead of inventing evidence.
70
+
71
+ ## Keep assets visually consistent
72
+
73
+ Keep useful recurring cues: light, viewpoint, color treatment, illustration perspective, texture, icon weight, or another property relevant to the concept. Define only what the task needs.
74
+
75
+ Compare assets together in representative contexts. Individually attractive photographs may imply different settings or activities. Preserve intentional contrast; repair accidental mismatch. Inspect icons at actual size, not just matching names.
76
+
77
+ For interface icons, use a coherent family and compatible stroke, fill, and optical weight. Prefer its designed sizes or optical variants where available; scaling a glyph need not preserve its balance beside text. [Carbon's icon guidance](https://www.carbondesignsystem.com/building-blocks/foundations/icons/guidelines) illustrates calibrated icon/type relationships within its system. Check visible alignment as well as the bounding box. Icon artwork and the interactive target are different sizes; use [Input methods](responsive-design.md#support-different-input-methods) for the latter. Keep necessary labels and do not mirror direction-sensitive or branded artwork automatically.
78
+
79
+ Use visual storytelling when a meaningful progression helps. Do not imply a factual sequence through a montage or staged reconstruction. Repeated motifs can aid recognition without adding an illustration to every section.
80
+
81
+ Consider acquisition, updating, localization, and production capacity. A custom image for every catalog item can create unsustainable work; a commissioned focal asset may justify its cost.
82
+
83
+ ## Choose assets for user needs
84
+
85
+ Each informative asset should answer a useful question. Add views when they show different information, not to fill a gallery.
86
+
87
+ For physical products, consider scale, fit, materials, construction, variants, and use context. Match dimensions and shown variants to the offered item. For software, show the relevant work or outcome with readable detail and enough context to avoid implying missing prerequisites. For services, represent people, activities, and environments accurately.
88
+
89
+ Use relevant local or subject expertise when unfamiliar representation could materially mislead. Do not infer identity, consent, or cultural meaning from appearance. Keep purposeful repetition; remove assets that add no useful information or character.
90
+
91
+ ## Check cropping and placement
92
+
93
+ Inspect the actual slot and narrow/wide variants. Preserve focal subjects, meaningful detail, scale cues, and space needed by adjacent text or controls. A center crop can change meaning even when the full image is suitable.
94
+
95
+ Choose another crop, image, or art-directed variant when needed. Do not stretch a product, crop out a safety-relevant detail, or mirror text, directional diagrams, logos, or meaningful actions merely to fit the layout.
96
+
97
+ Check text contrast against the actual crop. A dark overlay may damage the image or fail locally; reposition text or choose a different asset when clearer. Use [Visual Design](visual-design.md#define-color-roles-and-contrast) for the relevant contrast decisions.
98
+
99
+ Confirm the image still contributes after masks, washes, and overlays. Follow the intended subject's contour when a cut-out is needed; do not approximate it with an unrelated shape. Keep deliberate geometric crops when they serve the composition.
100
+
101
+ Specify sufficient quality for the intended size, enlargement, and use. The largest source file is not necessarily the right delivered asset. Communicate crop, focal point, important detail, and variants; Engineering handles delivery. Keep changing text editable and localizable when possible. Integral image text still needs legibility and equivalent meaning.
102
+
103
+ ## Check representation and provenance
104
+
105
+ Distinguish actual depiction, conceptual treatment, and draft placeholder. Never invent customers, facilities, testimonials, metrics, or product states and present them as evidence.
106
+
107
+ For synthetic or altered imagery, check whether viewers could reasonably interpret it as factual. Identify its illustrative status where material. Inspect text, geometry, anatomy, relationships, and product details. If accuracy cannot be established for a factual role, use a verifiable source or clearly nonliteral alternative.
108
+
109
+ Provenance, the record of an asset's origin and editing history, can help trace it. [C2PA's explainer](https://spec.c2pa.org/specifications/specifications/2.4/explainer/Explainer.html) distinguishes provenance from factual truth: credentials do not establish accuracy, permission, or suitability. Missing credentials do not establish deception. Do not claim validation without a suitable check or require a provenance service for ordinary work.
110
+
111
+ ## Check permission for the intended use
112
+
113
+ Before distributing an asset, inspect its actual source and applicable permission. A public page, search result, download button, or citation does not establish reuse rights. An inspiration link and a redistributed asset are different uses.
114
+
115
+ Check relevant conditions: commercial use, modification, attribution, redistribution, medium, and restrictions. A project's code license may not cover its photographs or logos. For example, [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) requires appropriate credit and modification notices; it does not supply every possible right or authorize implied endorsement.
116
+
117
+ Keep source, creator, terms, intended use, required credit, modifications, and unresolved restrictions in existing project notes when useful. Preserve required notices. Do not create a registry for every image or upload private material externally without authorization. Resolve a consequential permission gap or select a supported alternative before presenting the asset as cleared.
118
+
119
+ ## Evaluate assets in context
120
+
121
+ Inspect actual placement, content, and relevant states. Does the asset clarify the intended information or expression? Does it preserve context and fit identity without blocking reading or action?
122
+
123
+ For example, add an accurate scale view when a furniture image does not communicate size; replace an unreadable software collage with a focused capture; retain expressive illustration when its role is clear and fix only the mismatched asset.
124
+
125
+ Use [Accessibility & Inclusive Writing](../writing/accessibility-and-inclusion.md#provide-content-alternatives) for meaningful text alternatives and [W3C's image decision tree](https://www.w3.org/WAI/tutorials/images/decision-tree/) for informative, functional, decorative, and complex use distinctions. The same image can need different treatment in another context.
126
+
127
+ Inspect crop integrity, legibility, source records, and content completeness directly. Claims about comprehension, trust, or cultural fit may need appropriate reader evidence. Do not report a visual inspection as measured user impact; use [Design Evaluation](design-evaluation.md) for evaluation choices.
@@ -0,0 +1,121 @@
1
+ # Audio & Video
2
+
3
+ Use for video, audio, players, background media, sound feedback, and time-based interaction. [Art Direction](art-direction.md) covers selection and identity; [Motion Design](motion-design.md) covers interface movement.
4
+
5
+ ## Choose media by user need
6
+
7
+ Choose media when timing, movement, voice, demonstration, atmosphere, or narrative adds value, or when media consumption is the main task.
8
+
9
+ | Need | Starting approach | Trade-off |
10
+ | --- | --- | --- |
11
+ | Find or compare a detail | Text, diagram, screenshot, or concise sequence | Video can make a small fact slow to locate |
12
+ | Observe a changing process | Controllable demonstration | Important action must remain readable and revisitable |
13
+ | Learn | Focused explanation and meaningful sections | Watching is not proof of understanding |
14
+ | Entertainment/performance | Media with suitable continuity and control | Preserve pacing without assuming automatic continuation |
15
+ | Character/atmosphere | Relevant imagery or optional background media | Do not obscure the primary task or impose needless delivery cost |
16
+ | Interactive tour or branching content | Clear choices, return, timing, and alternatives | A fleeting hotspot or one sensory channel cannot be the only route |
17
+
18
+ A staged or generated demonstration must not imply unverified capabilities or real events. Consider sound-off use, shared spaces, language, attention, access needs, input, connection, and resources. Do not infer these from the device alone. Reuse known context and clarify only important gaps.
19
+
20
+ ## Place media in context
21
+
22
+ Make purpose and entry understandable through a suitable poster, title, known duration, or short description. A poster is not playback readiness or confirmed play. Do not disguise promotion or an unavailable asset as a play action.
23
+
24
+ Place explanatory media beside what it supports. Reserve room for controls, captions, and alternatives. Inspect changing frames for contrast and obstruction; a selected still is insufficient.
25
+
26
+ A hero or background video must not block the message, navigation, or main action. Provide suitable controls and a static or reduced-motion alternative. Muted video still uses data and can distract or cause motion discomfort. Use [Accessibility](accessibility.md#plan-motion-and-media-alternatives) for the scoped requirements.
27
+
28
+ ## Choose autoplay deliberately
29
+
30
+ Distinguish automatic entry playback, silent previews, and continuation after an intentionally started session. Prefer deliberate start when no media-consumption intent is established; avoid unexpected audible playback.
31
+
32
+ Where autoplay is justified, preserve controls and a useful experience when it is blocked. Do not work around user settings or treat an attempted start as confirmed playback.
33
+
34
+ Make automatic continuation understandable and stoppable where appropriate. Respect a deliberate pause, declined preference, and coherent return policy. Do not restart media merely because it re-enters view or start competing audio. Assess consequences through [Design Ethics](design-ethics.md); watch time alone does not establish user benefit.
35
+
36
+ ## Show playback states
37
+
38
+ | State | Communicate |
39
+ | --- | --- |
40
+ | Before play | Content, start action, known duration/live status, and relevant alternatives |
41
+ | Play requested | Accepted request, with preparation or required next action still pending |
42
+ | Playing | Active item, meaningful position/live status, and pause/sound controls |
43
+ | User-paused | Deliberate pause and usable resume |
44
+ | Seeking/track change | Requested location or track and pending outcome |
45
+ | Buffering/reconnecting | Waiting rather than intentional pause or completion |
46
+ | Ended | Actual completion, replay/next choice, and established continuation |
47
+ | Failed/blocked/unavailable | Supported reason, useful recovery, and appropriate alternative |
48
+
49
+ Distinguish elapsed position, duration, buffered availability, and live delay. Unknown preparation does not justify fabricated percentages. Missing captions or description are separate from main-stream failure.
50
+
51
+ For live content, distinguish live edge, delayed playback, and the available recorded window. Offer return-to-live or seeking only when supported. Do not promise replay of unavailable intervals.
52
+
53
+ Preserve useful position, tracks, speed, and volume through interruption when supported. Leaving, stopping, background playback, and cross-device resume are different capabilities. Match intent, privacy, and platform behavior. Use [Interaction Design](interaction-design.md) for failure/recovery semantics without copying its full state catalog.
54
+
55
+ ## Provide usable playback controls
56
+
57
+ Make relevant play/pause, position, sound, and track choices understandable and reachable. Icons, labels, states, and behavior must agree.
58
+
59
+ Support relevant keyboard, pointer, touch, and focus routes. Avoid hover-only or hidden-gesture access. Provide a non-drag seek route when applicable; fading controls must remain discoverable and operable. Scope shortcuts to avoid hijacking unrelated typing or assistive input.
60
+
61
+ Add chapters, transcript navigation, speed, quality, language, fullscreen, or picture-in-picture when useful and supported. Identify active modes and preserve place through changes. Include only features the clip and task need.
62
+
63
+ [W3C's media-player guidance](https://www.w3.org/WAI/media/av/player/) supports control selection; verify delivered behavior rather than assuming a listed player feature or custom appearance proves access.
64
+
65
+ ## Plan media accessibility
66
+
67
+ Identify live/prerecorded status, audio-only/video-only/synchronized content, meaningful speech/sounds, and unspoken visual information. Timed interaction can require more than a plain transcript.
68
+
69
+ For web work targeting [WCAG 2.2](https://www.w3.org/TR/WCAG22/):
70
+
71
+ | Media | Selected requirement |
72
+ | --- | --- |
73
+ | Prerecorded audio-only | Equivalent time-based-media alternative, 1.2.1, A |
74
+ | Prerecorded video-only | Equivalent time-based-media alternative or audio track, 1.2.1, A |
75
+ | Prerecorded synchronized media | Captions, 1.2.2, A; description or media alternative, 1.2.3, A; audio description, 1.2.5, AA |
76
+ | Live synchronized media with audio | Live captions, 1.2.4, AA |
77
+
78
+ Apply the specified clearly labeled media-alternative-for-text exceptions to 1.2.1, 1.2.2, and 1.2.3. Adjacent text alone does not establish an exception. A transcript does not replace required synchronized captions or the AA audio-description provision. [W3C explains](https://www.w3.org/WAI/WCAG22/Understanding/audio-description-prerecorded.html) that no extra description is necessary when existing audio already conveys all important visual information.
79
+
80
+ Match support to lost information:
81
+
82
+ - Captions synchronize speech and meaningful sounds, including needed speaker distinctions. A track called subtitles may omit these.
83
+ - Transcripts support review and navigation; descriptive transcripts also preserve visual information.
84
+ - Audio description supplies important visuals not already conveyed by sound. A dub or generic narration is not automatically adequate.
85
+ - Sign language and other supports depend on audience and applicable requirements; one written/spoken language does not serve everyone.
86
+
87
+ Make alternatives and languages discoverable near the player and match them to the right media version. Check meaning, timing, terminology, numbers, speaker changes, and visual coverage; do not assume automated output is accurate. Writing supplies faithful content; UI/UX supplies availability, selection, placement, and use. Sensory-control criteria remain in Accessibility.
88
+
89
+ ## Support learning with media
90
+
91
+ Tie instructional media to an understanding or action. Connect visuals and explanation in time and space. Remove competing distractions while retaining useful context, motivation, and demonstration.
92
+
93
+ Use meaningful sections, navigation, replay, and suitable pacing. A process may need continuity before optional detail; a new concept may need smaller units. Do not impose one duration, speaking rate, or segmentation formula.
94
+
95
+ Do not remove required captions or useful text merely because narration repeats it. Access, second-language reading, note-taking, and revisiting exact terms can justify redundancy.
96
+
97
+ Place practice or reflection meaningfully when part of the task. Let people perceive an interactive prompt, act, and understand the consequence. A quiz overlay, completion event, viewing percentage, or enjoyment score does not prove learning, retention, or transfer. Entertainment need not follow instructional constraints.
98
+
99
+ ## Use sound cues deliberately
100
+
101
+ Distinguish content, functional feedback, alerts, and expressive sound. Reuse a suitable established vocabulary; a tone has no universal meaning across settings and audiences.
102
+
103
+ Keep optional feedback proportionate, controllable, and consistent with preferences. Do not mask speech, compete with essential audio, or make sound the only consequential status route. Haptics are not a universal substitute. Safety-critical alerts require their actual constraints rather than a blanket mute policy.
104
+
105
+ Inspect repetition and competing audio. Let people understand or preview a consequential optional sound choice without startling them. Sound production and hardware alarm design remain specialist work.
106
+
107
+ ## Balance media quality and loading
108
+
109
+ Prioritize useful content and controls. Optional media or third-party players should not block unrelated work. A poster/static alternative can keep a page useful while media is deferred.
110
+
111
+ Choose quality for what must be perceived: small UI text or sign language can become unusable when reduced too far. Consider data cost, decoding resources, battery, and connection without assuming one device profile. Do not promise offline access, automatic adaptation, or uninterrupted playback without support.
112
+
113
+ For embeds, inspect relevant controls, tracks, privacy/data behavior, geometry, and failure paths. Check whether the host supplies required alternatives or sends data before playback starts; neither is guaranteed. Use [Performance](performance.md#prioritize-media-loading) for waiting and delivery. Engineering verifies resource strategy, supported formats, synchronization, and platform behavior.
114
+
115
+ ## Evaluate the media experience
116
+
117
+ Inspect relevant start, pause, seek, track, buffering, failure, end, resume, and live conditions. Check useful alternatives, keyboard/touch access, caption/control collisions, and behavior when autoplay is blocked, sound unavailable, or connection poor.
118
+
119
+ A screenshot can show placement, not sound, synchronization, focus, or buffering. A silent recording leaves audio unverified. Do not invent speech, unseen frames, tracks, or playback results. Use [Design Evaluation](design-evaluation.md) to match claims to evidence.
120
+
121
+ For example, preserve a paused clip when it scrolls back into view; provide revisitable steps for a procedure in a noisy workplace; distinguish return-to-live from delayed playback; retain the message and action when a hero loop cannot play.