w3c / wcag

Web Content Accessibility Guidelines
https://w3c.github.io/wcag/guidelines/22/
Other
1.09k stars 242 forks source link

Target Size (Min) and custom scrollbars #3963

Open fstrr opened 1 month ago

fstrr commented 1 month ago

If an author has customized a page's scrollbar and the page design has links that abut the scrollbar, does that fail Target Size (Minimum)? Here's an example CodePen (works in Firefox and Chromium). The scrollbar's track is 11px wide and the thumb is 4px wide.

A 24px circle placed over the scrollbar shows that the two targets intersect:

screengrab of part of a customized scrollbar with a 'back to top' link touching it
patrickhlauke commented 1 month ago

I'd say that fails, yes

fstrr commented 1 month ago

That's where I'd landed as well. Barring any naysayers, worth adding this as an example to the Understanding page?

patrickhlauke commented 1 month ago

will need to be very clear that it's failing because the author changed the presentation of the scrollbar explicitly. otherwise it's UI rendered by the browser and outside of the author's responsibility

fstrr commented 1 month ago

Yup, that's the reason I raised the issue—specifically because it's a customized scrollbar rather than the browser default :)

yatil commented 1 month ago

“You touch it, you own it.”

gundulaniemann commented 1 month ago

As it is a matter of size, only the size manipulation causes the fail. As the exception says: "User agent control: The size of the target is determined by the user agent and is not modified by the author;" Modifying the colors only may not lead to a fail.

In the example above the size was changed. If adding an according example to the UNderstanding document, only the size should be changed to avoid any misunderstandings.

s-h-a-d-o-w commented 1 month ago

I don't mean to hijack this issue, please let me know if I should open a new one but... I'm confused about this spec, as described in this issue as well as the spec itself.

The goal is described as: "Having targets with sufficient size - or at least sufficient target spacing - can help all users who may have difficulty in confidently targeting or operating small controls."

Yet the spec actually doesn't limit the target size but the area around the target. Even a 1px wide scrollbar would fulfill the spec, as long as there's enough space around it. This doesn't help the users described in the "benefits" section?

mraccess77 commented 1 month ago

I don't mean to hijack this issue, please let me know if I should open a new one but... I'm confused about this spec, as described in this issue as well as the spec itself.

The goal is described as: "Having targets with sufficient size - or at least sufficient target spacing - can help all users who may have difficulty in confidently targeting or operating small controls."

Yet the spec actually doesn't limit the target size but the area around the target. Even a 1px wide scrollbar would fulfill the spec, as long as there's enough space around it. This doesn't help the users described in the "benefits" section?

Perhaps it should be clarified that the goal is to prevent accidental activation of other nearby targets.

s-h-a-d-o-w commented 1 month ago

Ah, I see. Is being able to activate something, period, covered by any spec?

(I got here via https://drafts.csswg.org/css-scrollbars/#scrollbar-width - which seems to be quite a blow to accessibility. And it might've been wrong of them to link to this spec (Well... AAA, which requires an even bigger target but... that's a finer point) then?)

patrickhlauke commented 1 month ago

@s-h-a-d-o-w 2.5.5 does not allow for any exceptions in terms of spacing. Also, keep in mind that the note is aimed at implementers (i.e. browser developers that are implementing the spec in their product)

patrickhlauke commented 1 month ago

Yet the spec actually doesn't limit the target size but the area around the target.

which is the target spacing, which is covered in the bit you quoted just before "Having targets with sufficient size - or at least sufficient target spacing ..."

s-h-a-d-o-w commented 1 month ago

Alright, unfortunate (since it means I will have to continue fighting thin scroll bars on my own 😅) but thanks a lot for the explanation!