返回提示词目录第 1302 页

界面动效与闪烁无障碍审查

检查界面代码中的运动与闪烁风险,提供减弱动效、暂停控制等修复代码,并提示需实测确认。

完整提示词

<context>
Motion can make people ill and flashing can cause seizures. Two groups are at risk: people with vestibular disorders, migraine or concussion, for whom parallax, large zooms, scroll-jacking and spinning transitions can trigger dizziness and nausea for hours; and people with photosensitive epilepsy, for whom flashes in the wrong frequency, size or colour can trigger a seizure. Common misses: treating `prefers-reduced-motion` as "turn off everything", which breaks loading feedback, or as "slow it down", which does not help; carousels that auto-advance with no pause; background video that loops forever; and saturated red flashes, which carry their own threshold.
</context>

<task>
Audit this {{platform}} UI for motion and flashing risk:

<ui_code>
{{ui_code}}
</ui_code>

1. Inventory every effect: what moves or flashes, its trigger (load, scroll, hover, interaction, auto), area of the viewport, distance or scale, duration, repetition and whether it can be stopped.
2. Flashing (WCAG 2.3.1, level A): flag anything that flashes more than three times in any one-second period unless it is below the general and red flash thresholds. As a working rule, a flash covering more than about a quarter of a 10-degree field of view (roughly 341 x 256 px at typical viewing distance) or any saturated red flash is high risk. Say when a frame-by-frame measurement (for example with a photosensitive epilepsy analysis tool) is needed rather than guessing.
3. Auto-moving content (2.2.2, level A): anything that starts automatically, lasts more than 5 seconds and runs alongside other content needs pause, stop or hide. Auto-updating content needs pause or control of frequency.
4. Motion from interaction (2.3.3, AAA, but treat as required where it is large): parallax, zoom, scroll-linked and full-screen transitions can be disabled unless essential.
5. Classify each effect: essential (conveys information that cannot be conveyed another way, such as a progress indicator), functional (feedback that can be a cross-fade or colour change instead), or decorative (remove under reduced motion).
6. Fix with the platform API: CSS `@media (prefers-reduced-motion: reduce)` and `matchMedia` in script for web; `UIAccessibility.isReduceMotionEnabled` and its notification on iOS; `Settings.Global.ANIMATOR_DURATION_SCALE` or `ValueAnimator.areAnimatorsEnabled()` on Android; an in-game motion and flashing setting (camera shake, screen flashes, motion blur, field of view) that also reads the system setting where available. Replace motion with a fade or instant change rather than deleting feedback.
7. Add visible pause controls for carousels, background video and animated illustrations; stop animated GIFs or provide a still. Respect the user's choice across pages.
</task>

<constraints>
- Never declare content seizure-safe from code alone; say what to measure and with what kind of tool.
- Keep essential feedback such as loading and focus indicators, in a reduced form.
- If the description lacks size, speed or frequency for an effect, list the effect with "needs measuring" rather than inventing numbers.
{{> guardrails/scope-discipline}}
</constraints>

<output_format>
## Risk summary
Two or three sentences: the highest risk and who it affects.

## Findings
Table: Effect | Trigger | WCAG SC | Risk (seizure, vestibular, distraction) | Severity (blocker, serious, minor) | Essential, functional or decorative.

## Fixes
Code for {{platform}}: the reduced-motion handling, pause controls and replacements, with comments.

## Checks
Numbered: turning on the system reduced-motion setting and expected result per effect, flash measurement if needed, and a check that the pause control is keyboard and screen-reader operable.
</output_format>

可替换内容

  • {{platform}}
  • {{ui_code}}
  • {{> guardrails/scope-discipline}}

分类与标签

编程开发、无障碍审查、减少动态效果、闪烁检测、界面代码

前往 AI 图片创作