Skip to content

Commit

Permalink
Editorial revisions to invert colors section
Browse files Browse the repository at this point in the history
  • Loading branch information
mcking65 committed Nov 4, 2024
1 parent 0cf8008 commit 210d77e
Showing 1 changed file with 21 additions and 11 deletions.
32 changes: 21 additions & 11 deletions content/practices/high-contrast/high-contrast-practice.html
Original file line number Diff line number Diff line change
Expand Up @@ -178,14 +178,21 @@ <h2>User Options for Adjusting Colors and Contrast</h2>

<section id="invert-colors">
<h2>Invert Colors</h2>

<p>The invert colors setting is a simple transformation of colors used to render content to the opposite color. For example, content rendered as white is changed to black. Content styled as blue is rendered as a brown (e.g. a mixture of red and green). There are no media queries associated with identifying the invert colors setting.</p>

<p>Authors support this setting by insuring their content meets <a href="https://www.w3.org/TR/WCAG21/#contrast-minimum">WCAG 1.4.3: Contrast (Minimum)</a> contrast requirements, including components. The following example illustrates how the <code>switch</code> role example is rendered on macOS when invert colors is disabled and enabled.</p>


<h3 id="invert-colors-example-screenshots">Invert Colors Example: Button Switch</h3>
<table aria-labelledby="invert-colors-example-screenshots" class="data">
<p>
The invert colors setting is a simple transformation that renders content to its opposite color.
For example, content rendered as white is changed to black.
Content styled as blue is rendered as a brown, i.e., a mixture of red and green.
User agents do not provide a media query that can determine whether invert colors is enabled in the operating system.
</p>
<p>
To support invert colors effectively, insure content meets
<a href="https://www.w3.org/TR/WCAG22/#contrast-minimum">WCAG 1.4.3: Contrast (Minimum)</a>.
</p>
<p>
The following example illustrates how a <code>switch</code> element is rendered on macOS both when invert colors is disabled and enabled.
</p>
<table class="data">
<caption>Invert Colors Example: Button Switch</caption>
<thead>
<tr>
<th>Setting</th>
Expand All @@ -207,9 +214,12 @@ <h3 id="invert-colors-example-screenshots">Invert Colors Example: Button Switch<

<section id="prefers-contrast">
<h2>Increase Contrast</h2>

<p>When the increase contrast setting is is enabled the <code>prefers-contrast</code> media query changes from <code>no-preference</code> to <code>more</code>. The author <em>should</em> update the rendering of text content and components to meet <a href="https://www.w3.org/WAI/WCAG21/Understanding/contrast-enhanced">WCAG 1.4.6: Contrast (Enhanced)</a> requirement. If content already meets the enhanced requirement, the author <em>may</em> want to exceed the enhanced color contrast requirement.</p>

<p>When the increase contrast setting is is enabled the <code>prefers-contrast</code> media query changes from <code>no-preference</code> to <code>more</code>.
The author <em>should</em> update the rendering of text content and components to meet
<a href="https://www.w3.org/WAI/WCAG21/Understanding/contrast-enhanced">WCAG 1.4.6: Contrast (Enhanced)</a>
requirement.
If content already meets the enhanced requirement, the author <em>may</em> want to exceed the enhanced color contrast requirement.
</p>
<p>Note: Operating systems that support the <code>forced-colors</code> media query will set <code>prefers-contrast</code> to <code>custom</code> when the <code>forced-colors</code> is set to <code>active</code>. </p>

<h3 id="prefers-contrast-example">Increase Contrast Example</h3>
Expand Down

0 comments on commit 210d77e

Please sign in to comment.