samvera-labs / ramp

Interactive, IIIF powered audio/video media player React components library. Styleguidist Docs: https://samvera-labs.github.io/ramp/
https://ramp.avalonmediasystem.org/
30 stars 5 forks source link

Support 200% zoom in media player on mobile devices #596

Closed elynema closed 2 months ago

elynema commented 3 months ago

Description

For accessibility purposes, it is recommended to support up to 200% zoom (see WCAG criterion 1.4.4). Although this criterion specifically mentions resizability of text, it makes sense that controls also need to be available at 200% zoom.

Using 200% zoom in the browser, we find that controls are lost from Ramp's media player element on mobile devices in both Safari and Chrome.

Potential solutions:

Done Looks Like

200% zoom in Safari on iPhone 15 (not a mini):

screenshot-iPhone 15-17 5 (1)

200% zoom (4 notches larger) in Chrome on iPhone 15 (not a mini): screenshot-iPhone 15-17 5 (2)

200% zoom (4 notches larger) in Chrome on Galaxy s24: screenshot-Samsung Galaxy S24-14 0 (2)

elynema commented 3 months ago

This problem is potentially less critical on iPhones, as the user only needs to be able to click play, and then controls are accessible from the native player?

elynema commented 3 months ago

Youtube does not solve this problem very elegantly in Chrome on iPhone. screenshot-iPhone 15-17 0 (6)

Dananji commented 3 months ago

I think we can do the following easily to support 200% zoom all supported viewports;

  1. Move progress bar to the top of controls: One of the non-UX friendly things with the current interface when zoomed in is the progress bar getting smaller with zoom-in and making scrubbing harder. For this we can move progress bar to the top of the controls like below; Screenshot 2024-08-09 at 4 59 41 PM

This allows us a little bit more space for other controls when zooming in.

  1. Keep a fixed width to the player after a certain point (number 1 in potential solutions): I tested YouTube on desktop browsers at 200% zoom and beyond. I observed that, after the player reaches a certain width it doesn't adjust the size of the controls. Instead it keeps a fixed width to the player and enable horizontal page scroll. This is helpful, because one of the issues with zooming in Ramp is controls getting hidden and in-accessible after a certain point. I think this might be easier than consolidating icons into a widget (at least for a first-pass), which I haven't been able to figure out yet.
joncameron commented 2 months ago

Looks good!