Skip to content

Commit 8f12749

Browse files
authored
Merge pull request #4694 from w3c/tantek-patch-1
[css-scrollbars-1] Add suggestions (lightly edited) to resolve #3315. Per @fantasai point that it is better than existing text, and leave issue open for further review/tweaking: #3315 (comment)
2 parents 52732ea + 123fb10 commit 8f12749

File tree

1 file changed

+33
-6
lines changed

1 file changed

+33
-6
lines changed

css-scrollbars-1/Overview.bs

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,17 @@ if the corresponding part do not exist on the underlying platform.
140140
When using scrollbar-color property with specific color values,
141141
authors should ensure the specified colors have enough contrast between them.
142142
For keyword values, UAs should ensure the colors they use have enough contrast.
143-
See <a href="https://www.w3.org/TR/WCAG20-TECHS/G183.html">
144-
Techniques for WCAG 2.0: G183: Using a contrast ratio of 3:1 […]</a> [[WCAG20]].
143+
UAs should ensure that their actual color values for
144+
scrollbar-color: light and scrollbar-color: dark
145+
should provide sufficient contrast with the element’s background
146+
(i.e. scrollbar-color: light on a light background and scrollbar-color: dark on a dark background
147+
should always have sufficient contrast)
148+
See
149+
<a href="https://www.w3.org/TR/WCAG21/#non-text-contrast">WCAG 2.1 SC 1.4.11 Non-text Contrast</a>
150+
[[WCAG21]].
151+
UAs may ignore these contrast requirements based on explicit user preferences
152+
(for example, when users choose a configuration option/setting that
153+
always ensures a particular scrollbar color / use of system default scrollbars).
145154

146155
Note: when a user interacts with a scrollbar (e.g. hovering or activating),
147156
implementations may alter which scrollbar colors apply to which scrollbar parts.
@@ -197,6 +206,15 @@ In that case, implementations may treat this value as ''scrollbar-width/auto''.
197206

198207
UAs must apply the scrollbar-width value set on the root element to the viewport.
199208

209+
UAs should enforce a minimum actual size of scrollbar width per
210+
<a href="https://www.w3.org/TR/WCAG21/#target-size">WCAG 2.1 SC 2.5.5 Target Size</a>
211+
[[WCAG21]].
212+
213+
Authors that use scrollbar-width: none should provide an alternative/equivalent visual hint that
214+
scrolling is possible and there is more content.
215+
For situations where an element is going to be scrolled by other means instead of direct user manipulation
216+
(e.g. programmatically), authors should use overflow: hidden instead of scrollbar-width: none.
217+
200218
Note: Unlike 'overflow' (and overflow-*) properties,
201219
a scrollbar-width value set on the HTML body element is not propagated to the viewport.
202220

@@ -209,8 +227,12 @@ This appendix is <em>informative</em>.
209227

210228
<p>
211229
Thanks to the use-cases, prototyping, implementation, and feedback from
212-
<span class="h-card">Tab Atkins</span> and
213-
<span class="h-card">Xidorn Quan</span>.
230+
<a class="h-card" href="https://xanthir.com/">Tab Atkins</a> and
231+
<a class="h-card" href="https://www.upsuper.org/">Xidorn Quan</a>.
232+
Thanks to accessibility review and contributions
233+
(<a href="https://github.com/w3c/csswg-drafts/issues/3315">#3315</a>)
234+
from
235+
<a class="h-card" href="https://www.splintered.co.uk">Patrick H. Lauke</a>.
214236
</p>
215237

216238
<h2 class="no-num" id="changes">Appendix B. Changes</h2>
@@ -221,9 +243,14 @@ This appendix describes changes from the
221243
<a href="https://www.w3.org/TR/2018/WD-css-scrollbars-1-20180925/">First Public Working Draft (FPWD) of 25 Sep 2018</a>.
222244
<ul>
223245
<li><a href="https://github.com/w3c/csswg-drafts/issues/3237">#3237</a>:
224-
scrollbar-color computed value changed to: specified keyword or two computed colors</li>
246+
scrollbar-color computed value changed to: specified keyword or two computed colors
247+
</li>
225248
<li><a href="https://github.com/w3c/csswg-drafts/issues/4693">#4693</a>:
226-
Clarified scope: styling scrollbar controls themselves.</li>
249+
Clarified scope: styling scrollbar controls themselves, no layout or scrollability.
250+
</li>
251+
<li><a href="https://github.com/w3c/csswg-drafts/issues/3315">#3315</a>:
252+
More and updated accessibility considerations for scrollbar-color and scrollbar-width.
253+
</li>
227254
</ul>
228255

229256
<h2 class="no-num" id="security-privacy-considerations">Appendix C. Considerations for Security and Privacy</h2>

0 commit comments

Comments
 (0)