Intent to Ship: Keyboard-focusable scroll containers

177 views
Skip to first unread message

Hugo Holgersson

unread,
Nov 5, 2018, 12:46:02 PM11/5/18
to blink-dev

Contact emails

hu...@chromium.org


Explainer

None.


Spec

The HTML spec lists scrollable regions as [potential] focusable areas but doesn't enforce a default tabIndex value (confirmed at GitHub).


Summary

Make scroll containers focusable using sequential focus navigation by changing their default tabIndex value from -1 to 0.


Motivation

Today, the tab key doesn't focus scrollers unless they explicitly got tabIndex >= 0. By giving scrollers a default tabIndex of 0, users who can't (or doesn't want to) use a mouse will be able to focus and read clipped content by using a keyboard's tab and arrow keys.


Link to “Intent to Implement” blink-dev discussion

None. Already implemented. The code change is small.


Link to Origin Trial feedback summary

None.

Is this feature supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

Yes.


Demo link

See the CL's test.


Risks

Interoperability

Edge: No signals

Firefox: Shipped (a long time ago)

Safari: No signals

Web developers: Positive signals


Compatibility

Affects the tab order of documents that have overflow: scroll|auto-elements that contain clipped content.


Ergonomics

Web pages developed with [keyboard] accessibility in mind already work around this difference to Firefox by manually overriding Chrome's default (tabIndex=-1) with tabIndex=0 on scrollers.


Activation

Web pages not developed with [keyboard] accessibility in mind will immediately become more accessible to users who cannot, or doesn't want to, use a mouse.


Is this feature fully tested by web-platform-tests?

The CL has wtp-like tests that we can upstream once testharness.js gets a browser-independent way to trigger sequential navigation.


Entry on the feature dashboard

TAMURA, Kent

unread,
Nov 5, 2018, 9:05:01 PM11/5/18
to hu...@vewd.com, blin...@chromium.org
LGTM1.  It's necessary for accessibility, and has low risk because Firefox already does it.

A scrollable area will have focus ring, and it can be focused by mouse click too, right?

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/f46d0d9d-9f3a-4377-9d1f-b0a0f4b92eba%40chromium.org.


--
TAMURA Kent
Software Engineer, Google


Hugo Holgersson

unread,
Nov 6, 2018, 4:22:52 AM11/6/18
to Kent Tamura, blin...@chromium.org
Thanks. Yes, that's correct. I don't intend to change mouse focusing and/or focus ring logic.

Daniel Bratell

unread,
Nov 6, 2018, 5:20:12 AM11/6/18
to Kent Tamura, Hugo Holgersson, blin...@chromium.org
LGTM2

/Daniel
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAO_N0jea9x3aU3u6MxWZC5xrzjb_5thiD7A6ZJ2g8eezM3-HVA%40mail.gmail.com.



--
/* Opera Software, Linköping, Sweden: CET (UTC+1) */

Philip Jägenstedt

unread,
Nov 6, 2018, 10:12:03 AM11/6/18
to Daniel Bratell, TAMURA, Kent, Hugo Holgersson, blin...@chromium.org
Reply all
Reply to author
Forward
0 new messages