Forced Colors Mode
強制カラー モード
強制カラー モードは、多くのページカラーの代わりにユーザーが選択したシステムパレットを使用します。これにより、コントロールやテキストを区別しやすくすることができます。
@media (forced-colors: active) -> system colors + visible shape and statebackground + box-shadowButtonText · ButtonFace · borderoutline: 2px@media (forced-colors: active) -> system colors + visible shape and stateA11Yもう一つの例
ボタンは作成者の背景と影を失います。境界線、テキスト、フォーカスインジケータは依然としてその形と状態を示します。
主な部分
- 01著者パレット
- 02ユーザー強制パレット
- 03可視境界
- 04システムカラー
- 05フォーカスインジケーター
- 06色調整例外
以下の場合に使用します
強制カラーを有効にした状態でコントロールをテストしてください。重要な境界を見えるように保ち、必要に応じてシステムカラーを使用してください。
以下の場合は使用しないでください
色やボックスシャドウだけに依存しないでください。色を維持することが不可欠な場合にのみ、forced-color-adjust を none にしてください。
コードで使用する名前
@media (forced-colors: active) -> system colors + visible shape and state 出荷前に
Before release, check the page structure, keyboard access, visible focus, contrast, and zoom. Also check loading, empty, error, success, cancel, and reduced-motion states.
Outcome:Complete the task with 強制カラー モード (Forced Colors Mode)。 User context:ボタンは作成者の背景と影を失います。境界線、テキスト、フォーカスインジケータは依然としてその形と状態を示します。 Recommended pattern:強制カラー モード (Forced Colors Mode)。 Why it fits:強制カラーを有効にした状態でコントロールをテストしてください。重要な境界を見えるように保ち、必要に応じてシステムカラーを使用してください。 Do not use it when:色やボックスシャドウだけに依存しないでください。色を維持することが不可欠な場合にのみ、forced-color-adjust を none にしてください。 Product requirements: Define the default, loading, empty, error, success, and recovery states. Keep user input. Give clear feedback after every action. Accessibility and resilience: Use semantic HTML, full keyboard access, and visible focus. Make the layout work when zoomed and support reduced motion. Follow the project’s current rules. Do not add a new UI library unless the project already uses it. Acceptance criteria: The main task works with keyboard only and at 320px width. Focus and status changes are announced. Check loading, failure, retry, cancel, and reduced-motion paths. Evidence and limits (evidence boundary):きちんとした書類でも、まだドラフトやリリース候補、あるいは最終版かもしれません。ステータスや、ブラウザやプラットフォームの対応状況を確認しましょう。 Unknowns to confirm: Product wording, data source, analytics events, supported devices and languages, and platform limits.
このリクエストを確認する
Review how 強制カラー モード (Forced Colors Mode) is used now. Definition: 強制カラー モードは、多くのページカラーの代わりにユーザーが選択したシステムパレットを使用します。これにより、コントロールやテキストを区別しやすくすることができます。 Release checks: Before release, check the page structure, keyboard access, visible focus, contrast, and zoom. Also check loading, empty, error, success, cancel, and reduced-motion states. Before changing code, list the evidence, gaps, severity, and the smallest safe fix.