[a11y] Ensure FenixSnackbar is Fully Meeting Accessibility Requirements and Best Practices
Categories
(Firefox for Android :: Design System and Theming, task)
Tracking
()
People
(Reporter: olivia, Unassigned, NeedInfo)
Details
(Keywords: access)
This purpose of this bug is to ensure the a11y requirements for the standard FenixSnackbar
are being met and make any changes to meet them or else file additional bugs for the work.
For bug 1884475 comment 4, :ayeddi, made an important comment about the accessibility of the Translations Snackbar.
:ayeddi mentioned:
One note: if the snackbar would be appearing and disappearing too quickly (ideally, 20 sec+), less than 5 sec is considered to be blinking and has high risk to trigger migranes for various groups of users. I'd vote for 20+ sec to avoid hurting sighted users and to also allow users to locate and read the snackbar.
I investigated the Translations snackbar and it is using the standard snackbar:
FenixSnackbar.make(
view = binding.dynamicSnackbarContainer,
duration = Snackbar.LENGTH_LONG,
isDisplayedWithBrowserToolbar = true,)
Snackbar.LENGTH_LONG
didn't give me a direct time length and I wonder if it is SDK dependent variable. I suspect it should be pre-defined at a minimum of 5s based on the comment above. When manually testing, I counted right around 4+s, but couldn't be totally sure it was the full 5s.
Additionally, if accessibility services is enabled, then the length of the Snackbar increased to 15s, not the recommended 20s here.
private const val LENGTH_ACCESSIBLE = 15000 // 15 seconds in ms
...
if (parent.context.settings().accessibilityServicesEnabled) {
LENGTH_ACCESSIBLE
}
I also wonder if we should be more direct in our checking on the criteria to show the longer show time. I think some users not running accessibilityServices
on their phone might also want longer Snackbars. Maybe we should consider a toggle under the Fenix Accessibility Settings of "Increase Snackbar Timeout" or something similar? Alternatively, or additionally, I set the OS's Accessibility Setting of "Time to take action" to 30s and saw no change in Snackbar time duration on mozemulator. That might also be a good setting we should respect with Snackbars.
Reporter | ||
Comment 1•1 year ago
|
||
Could you also provide additional guidance or recommendations for Snackbars based on this overview?
Reporter | ||
Updated•1 year ago
|
I would love to get some accessibility thinking on this. Could we go to 20s at default instead of 15s when accessibility services are enabled?
Comment 3•4 months ago
|
||
Hey everyone,
Thanks for the discussion here! I have a patch out to address this by allowing us to pass custom durations to the snackbar - since the Snackbar for WebCompat Reporter needs to be shown for 20 seconds. Currently, we just use the presets that are provided by the Material 2 Snackbar library. If there is intention to use 20 seconds as the accessible duration, it may be worth having a preset for 20 seconds as well (but also the ability to pass custom durations)
Description
•