RE: [css-snappoints] What if snapped element is much taller/wider than viewport?

On 11/20/2015 09:05 PM, fantasai wrote:
 
> On 11/20/2015 08:57 PM, Belov, Charles wrote:
> > If a snapped element is much taller/wider than the viewport, possibly as a
> result of zooming by the site visitor or their personal style sheet, could
> the situations arise that a site visitor would miss content or would be
> unable to scroll down or up using the keyboard? If so, that could present an
> accessibility issue.
> >
> > Sample scenario:
> > 1. Visitor presses spacebar to scroll down. Without scroll-snapping,
> element A would have come into view.
> > 2. Browser automatically snaps to top of element A, which is three
> > times the height of the viewport. (Will we miss content between what would
> have been top of screen and top of element A?  If so, this is an
> accessibility problem.) 3. Visitor presses spacebar to scroll down.
> > 4. Browser automatically snaps to top of element A, which is three
> > times the height of the viewport. (Visitor cannot escape the pull of
> > the snap, which would also be an accessibility problem.)
> >
> > Does the user agent need to have an accessibility option to not snap?
> 
> This is exactly why Tab and I submitted the change proposal, specifically
> this section:
>    https://drafts.csswg.org/css-scroll-snap/#snap-overflow
> 
> ~fantasai

Thank you. I hadn't seen that; it's helpful and very clear. It might also be helpful to expand that to include the expected behavior for keyboard navigation. 

Perhaps something like:

If the snap is to the top of the object, and the object has most recently been snapped to that point, do not re-snap that object in response to an upward key press, e.g., one or more up arrows or page up.

If the snap is to the bottom of the object, and the object has most recently been snapped to that point, do not re-snap that object in response to an downward key press, e.g., one or more down arrows or page down or spacebar.

For that matter, this could be an issue even if a snapping object is smaller than the viewpoint. If someone is trying to arrow up or down because they only wanted to scroll the page a tiny amount, it would be very annoying if the browser kept re-snapping to the object. 

Actually, there might be an accessibility issue in general with flinging, as someone might not have sufficient motor control to fling just enough to escape the snapping point but not so much as to wind up much further down the page than the next item of content (or previous item if scrolling up) if there is no subsequent snapping point.  (I don't have much experience with flinging, so I don't know whether my concern is real or just theoretical.) 


Charles Belov
Webmaster
San Francisco Municipal Transportation Agency
1 South Van Ness Avenue, 3rd Floor
San Francisco, CA 94103
Email: charles.belov@sfmta.com 
Phone: 415.701.4388
www.sfmta.com  

Received on Wednesday, 25 November 2015 00:26:21 UTC