[csswg-drafts] [css-scrollbars][pointerevents] The scrollbar should keep responding on scrollable elements with pointer-events: none (#9001)

Sharcoux has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-scrollbars][pointerevents] The scrollbar should keep responding on scrollable elements with pointer-events: none ==
When using `pointer-events: none` on a scrollable element, it is unclear if the scrollbar should respond to click. If you read those bugs reports: https://bugzilla.mozilla.org/show_bug.cgi?id=1839481 and https://bugzilla.mozilla.org/show_bug.cgi?id=880671 , you will see that the behavior has already changed twice in Firefox. Currently it doesn't respond to click.

On Chrome, I didn't understand why yet, but I got different results in different cases, so I'm not sure about the current policy.

IMO, the scrollbar **should** respond to clicks even with `pointer-events: none`. This is because, if the dev doesn't want the user to interact with the scrollbar, they can hide it with, for instance, overflow: hidden. On the contrary, if they want to ignore the clicks on the scrollable container but still let the user interact with the scrollbar, they would be doomed. Anyway, showing a scroll bar that the user cannot use is probably a bad idea for accessibility.

Here is a concrete case that can serve as an example: https://stackoverflow.com/questions/76517363/scrollbar-is-not-clickable-in-firefox-when-using-pointer-events-none

Here is a working demo illustrating my point: https://codesandbox.io/s/scrollarea-wider-with-pointer-event-clthvw


Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9001 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Friday, 23 June 2023 03:54:37 UTC