New issue
Advanced search Search tips

Issue 652996 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug
Team-Accessibility



Sign in to add a comment

Accessibility hit testing is inaccurate on Windows, Mac, & Linux

Project Member Reported by dmazz...@chromium.org, Oct 5 2016

Issue description

It's easy to repro on Mac OS X with VoiceOver.

1. VoiceOver Utility > Navigation > Mouse pointer : set to "Moves VoiceOver cursor"
2. Turn on VoiceOver

Now as you move the mouse it focuses whatever you hover over. (Warning, this can be very disconcerting if you're not used to it!)

3. Open hangouts.google.com and try hovering over icons and threads - it doesn't work very well.

Alternatively, open Accessibility Inspector. The same issue manifests with inspectors on Windows and Linux.

The hit testing generally works fine for simple web pages, but breaks in cases of z-indexing, overflow, and other more advanced layouts, because it's done based on the bounding boxes in the browser process.

 
Project Member

Comment 1 by bugdroid1@chromium.org, Oct 11 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e7ca9f46f8f281febb2762ce693b7f8d93e25f9e

commit e7ca9f46f8f281febb2762ce693b7f8d93e25f9e
Author: dmazzoni <dmazzoni@chromium.org>
Date: Tue Oct 11 20:03:21 2016

Implement caching asynchronous accessibility hit testing.

Native accessibility APIs all have some sort of "hit test"
function. Unfortunately on Mac, Windows, and Linux, they're all
synchronous APIs. This is problematic for Chrome because only
the render process can do an accurate hit test.

Previously we relied on an approximate hit test based on
accessible bounding boxes in the browser process. This was
okay for debugging, but not for users with low-vision who want
the accessible cursor to follow the mouse accurately.

To fix it, every time we get a hit test request we send an
asynchronous message to do an accurate hit test. While waiting,
we return an approximate hit test result instead. The next time
the mouse moves, if it's within the bounds of the object found
by the asynchronous hit test, we return that.

In practice it works well - as you mouse over an object, the
first pixel you cross will occasionally return the wrong object,
but one or two pixels later the correct object has been returned
by Blink and then it's correct.

Includes a test that confirms this behavior, that calling the
hit test first returns an approximate result and then later
returns the correct result if you call it repeatedly.

BUG= 652996 

Review-Url: https://codereview.chromium.org/2393123002
Cr-Commit-Position: refs/heads/master@{#424521}

[modify] https://crrev.com/e7ca9f46f8f281febb2762ce693b7f8d93e25f9e/content/browser/accessibility/browser_accessibility.cc
[modify] https://crrev.com/e7ca9f46f8f281febb2762ce693b7f8d93e25f9e/content/browser/accessibility/browser_accessibility.h
[modify] https://crrev.com/e7ca9f46f8f281febb2762ce693b7f8d93e25f9e/content/browser/accessibility/browser_accessibility_auralinux.cc
[modify] https://crrev.com/e7ca9f46f8f281febb2762ce693b7f8d93e25f9e/content/browser/accessibility/browser_accessibility_cocoa.mm
[modify] https://crrev.com/e7ca9f46f8f281febb2762ce693b7f8d93e25f9e/content/browser/accessibility/browser_accessibility_manager.cc
[modify] https://crrev.com/e7ca9f46f8f281febb2762ce693b7f8d93e25f9e/content/browser/accessibility/browser_accessibility_manager.h
[modify] https://crrev.com/e7ca9f46f8f281febb2762ce693b7f8d93e25f9e/content/browser/accessibility/browser_accessibility_win.cc
[modify] https://crrev.com/e7ca9f46f8f281febb2762ce693b7f8d93e25f9e/content/browser/accessibility/hit_testing_browsertest.cc
[add] https://crrev.com/e7ca9f46f8f281febb2762ce693b7f8d93e25f9e/content/test/data/accessibility/hit_testing/button.html
[add] https://crrev.com/e7ca9f46f8f281febb2762ce693b7f8d93e25f9e/content/test/data/accessibility/hit_testing/button_scrolled.html
[add] https://crrev.com/e7ca9f46f8f281febb2762ce693b7f8d93e25f9e/content/test/data/accessibility/hit_testing/hit_testing.html

Status: Fixed (was: Started)

Sign in to add a comment