[go: up one dir, main page]

[SpatNav]: Make {cursor: pointer} trees focus candidates

Background:
Some web apps use one "catch all"-click handler, often put
on <body> or a container <div>, to react on clicks within
certain areas of the page. These web pages expect clicks
(or touches) and are not designed with key[board] users in
mind (they lack tabindex).

These pages' clickables, for example <div>s that look like
buttons, are often styled with {cursor: pointer}.

Problem:
These web pages are inaccessible for keyboard-only users.

Solution:
Enable SpatNav on these web apps by adding {cursor: pointer}
sub trees' tip to the list of navigation candidates.

Spec discussion:
https://github.com/w3c/csswg-drafts/issues/3395

Note:
snav-imagemap-area-not-focusable.html found a bug in
Chrome's UA CSS. We used to style *all* <area>s as
clickables, with {cursor: pointer}, even those without a
href-attribute. I fixed this in crrev.com/c/1653009.

(cherry picked from commit 308a30020307ae3925507536c48e5450c55b21f2)

Bug: 961927
Change-Id: I7baa2ba6f5f36ebc23b072d677edc66acfb2a70b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1632231
Commit-Queue: Hugo Holgersson <hholgersson@fb.com>
Reviewed-by: David Bokan <bokan@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#669193}
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1662868
Cr-Commit-Position: refs/branch-heads/3809@{#375}
Cr-Branched-From: d82dec1a818f378c464ba307ddd9c92133eac355-refs/heads/master@{#665002}
2 files changed