WebAIM - Web Accessibility In Mind

E-mail List Archives

Re: Floating "back to top" element -- no keyboard focus

for

From: glen walker
Date: Mar 13, 2019 4:46PM


I'm not sure it fails either 2.1.1 or 2.4.3.

2.1.1 says "All *functionality *of the content is operable through a
keyboard interface..." It doesn't say I have to be able to interact with
that specific element with a keyboard but that the *function of that
element *has to be available to a keyboard user. Or at least that's how I
read it. The function of the "back to top" element is to move you to the
top of the page. I use the Home/End keys all the time. That's the same
"functionality" as the "back to top" element so I don't think that element
has to be keyboard focusable.

2.4.3 says "...focusable components receive focus in an order that
preserves meaning and operability." Because of 2.1.1, that element doesn't
need to receive focus (at least in my opinion), and if it doesn't receive
focus, it's not a "focusable component" and thus 2.4.3 doesn't apply.

Perhaps I'm too liberal on my interpretation but I wouldn't flag that
element as a failure.

That doesn't mean you can't recommend that the element should receive focus
and have a keyboard handler (it's currently only listening for a mouse
click), but I don't think it should be a requirement.

Glen