@@ -140,8 +140,17 @@ if the corresponding part do not exist on the underlying platform.
140
140
When using scrollbar-color property with specific color values,
141
141
authors should ensure the specified colors have enough contrast between them.
142
142
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).
145
154
146
155
Note: when a user interacts with a scrollbar (e.g. hovering or activating),
147
156
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''.
197
206
198
207
UAs must apply the scrollbar-width value set on the root element to the viewport.
199
208
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
+
200
218
Note: Unlike 'overflow' (and overflow-*) properties,
201
219
a scrollbar-width value set on the HTML body element is not propagated to the viewport.
202
220
@@ -209,8 +227,12 @@ This appendix is <em>informative</em>.
209
227
210
228
<p>
211
229
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> .
214
236
</p>
215
237
216
238
<h2 class="no-num" id="changes">Appendix B. Changes</h2>
@@ -221,9 +243,14 @@ This appendix describes changes from the
221
243
<a href="https://www.w3.org/TR/2018/WD-css-scrollbars-1-20180925/">First Public Working Draft (FPWD) of 25 Sep 2018</a> .
222
244
<ul>
223
245
<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>
225
248
<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>
227
254
</ul>
228
255
229
256
<h2 class="no-num" id="security-privacy-considerations">Appendix C. Considerations for Security and Privacy</h2>
0 commit comments