New issue
Advanced search Search tips

Issue 764065 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug
Team-Accessibility

Blocking:
issue 717677



Sign in to add a comment

Accessible bounding box should clip

Project Member Reported by dmazz...@chromium.org, Sep 11 2017

Issue description

When Chrome computes the bounding box of an accessible object it should clip to the bounds of the nearest window.

It's possible to reproduce on any platform when running a screen reader that highlights the bounds of the current focused object and updates when you scroll the page, however the details may vary by platform.

On Chrome OS, turn on ChromeVox, then Tab to a link that's below the fold (the page has to scroll), then scroll back up to the top of the page without changing focus (e.g. using the mouse wheel).

See attached images: focus a link on Wikipedia while the page is scrolled slightly, then use the mouse wheel to scroll up a bit so that it's now off-screen; the highlight is now outside of the window.

 
clip-1.png
215 KB View Download
clip-2.png
197 KB View Download
A good place to write a test for this would be a DumpAccessibilityTree test - see these docs: https://chromium.googlesource.com/chromium/src/+/lkgr/content/test/data/accessibility/readme.md - and follow the examples in content/test/data/accessibility/html/*coordinates*html for some specific tests involving coordinates and bounding boxes.

The fix may require two things:

* AXObject::GetRelativeBounds in third_party/WebKit/Source/modules/accessibility/AXObject.cpp may be returning the size of the whole page contents, instead of just the visible portion of the page, when IsWebArea() is true.

* Once AXObject::GetRelativeBounds correctly contains the bounds of the web page, AXTree::RelativeToTreeBounds should be able to do the clipping. Fix ui/accessibility/ax_tree.cc and add a new test to ui/accessibility/ax_tree_unittest.cc, then make the DumpAccessibilityTree test pass too.

My preferred behavior would be that the width and/or height are reduced to 1 pixel, not 0 pixels, because 0 pixels indicates an uninitialized or invalid bounding box.

So for example, if the window is 800 x 600 pixels, and the accessible object has coordinates (400, 700) size (50 x 50), the bounding box should be clipped to (400, 599) size (50 x 1).

Blocking: 717677
Project Member

Comment 3 by bugdroid1@chromium.org, Sep 19 2017

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

commit 77cdaac7966c31125e514b7030bf699379c844e9
Author: Katie Dektar <katydek@google.com>
Date: Tue Sep 19 21:28:30 2017

Clips accessible bounding box to nearest window.

For example, if a bounding box extends partially below of a window,
it will be shrunk in Y to match the border of the window. If a
bounding box is fully below a window, it will be decreased to a
height of 1 and placed at the very bottom of that window.

R=dmazzoni@chromium.org

Bug:  764065 
Change-Id: Ibb105874710ebb2a0f3a7623d81b10a3f51f09ca
Reviewed-on: https://chromium-review.googlesource.com/669949
Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org>
Commit-Queue: Katie Dektar <katydek@google.com>
Cr-Commit-Position: refs/heads/master@{#502954}
[modify] https://crrev.com/77cdaac7966c31125e514b7030bf699379c844e9/chrome/test/data/extensions/api_test/automation/tests/location_scaled/location_scaled.js
[modify] https://crrev.com/77cdaac7966c31125e514b7030bf699379c844e9/chrome/test/data/extensions/api_test/automation/tests/tabs/location.js
[modify] https://crrev.com/77cdaac7966c31125e514b7030bf699379c844e9/content/browser/accessibility/accessibility_win_browsertest.cc
[modify] https://crrev.com/77cdaac7966c31125e514b7030bf699379c844e9/content/browser/accessibility/browser_accessibility_manager_unittest.cc
[modify] https://crrev.com/77cdaac7966c31125e514b7030bf699379c844e9/content/browser/accessibility/dump_accessibility_tree_browsertest.cc
[modify] https://crrev.com/77cdaac7966c31125e514b7030bf699379c844e9/content/test/data/accessibility/html/iframe-coordinates-cross-process-expected-blink.txt
[modify] https://crrev.com/77cdaac7966c31125e514b7030bf699379c844e9/content/test/data/accessibility/html/iframe-coordinates-cross-process-expected-mac.txt
[modify] https://crrev.com/77cdaac7966c31125e514b7030bf699379c844e9/content/test/data/accessibility/html/iframe-coordinates-cross-process-expected-win.txt
[modify] https://crrev.com/77cdaac7966c31125e514b7030bf699379c844e9/content/test/data/accessibility/html/iframe-coordinates-expected-blink.txt
[modify] https://crrev.com/77cdaac7966c31125e514b7030bf699379c844e9/content/test/data/accessibility/html/iframe-coordinates-expected-mac.txt
[modify] https://crrev.com/77cdaac7966c31125e514b7030bf699379c844e9/content/test/data/accessibility/html/iframe-coordinates-expected-win.txt
[modify] https://crrev.com/77cdaac7966c31125e514b7030bf699379c844e9/content/test/data/accessibility/html/iframe-transform-cross-process-expected-blink.txt
[modify] https://crrev.com/77cdaac7966c31125e514b7030bf699379c844e9/content/test/data/accessibility/html/iframe-transform-cross-process.html
[modify] https://crrev.com/77cdaac7966c31125e514b7030bf699379c844e9/content/test/data/accessibility/html/iframe-transform-expected-blink.txt
[modify] https://crrev.com/77cdaac7966c31125e514b7030bf699379c844e9/content/test/data/accessibility/html/iframe-transform-expected-win.txt
[modify] https://crrev.com/77cdaac7966c31125e514b7030bf699379c844e9/content/test/data/accessibility/html/iframe-transform-nested-cross-process-expected-blink.txt
[modify] https://crrev.com/77cdaac7966c31125e514b7030bf699379c844e9/content/test/data/accessibility/html/iframe-transform-nested-cross-process.html
[modify] https://crrev.com/77cdaac7966c31125e514b7030bf699379c844e9/content/test/data/accessibility/html/iframe-transform-nested-expected-blink.txt
[modify] https://crrev.com/77cdaac7966c31125e514b7030bf699379c844e9/content/test/data/accessibility/html/iframe-transform-nested.html
[modify] https://crrev.com/77cdaac7966c31125e514b7030bf699379c844e9/content/test/data/accessibility/html/iframe-transform-scrolled-expected-blink.txt
[modify] https://crrev.com/77cdaac7966c31125e514b7030bf699379c844e9/content/test/data/accessibility/html/iframe-transform-scrolled.html
[modify] https://crrev.com/77cdaac7966c31125e514b7030bf699379c844e9/content/test/data/accessibility/html/iframe-transform.html
[add] https://crrev.com/77cdaac7966c31125e514b7030bf699379c844e9/content/test/data/accessibility/html/window-crops-items-expected-blink.txt
[add] https://crrev.com/77cdaac7966c31125e514b7030bf699379c844e9/content/test/data/accessibility/html/window-crops-items.html
[modify] https://crrev.com/77cdaac7966c31125e514b7030bf699379c844e9/third_party/WebKit/Source/modules/accessibility/AXObject.cpp
[modify] https://crrev.com/77cdaac7966c31125e514b7030bf699379c844e9/ui/accessibility/ax_tree.cc
[modify] https://crrev.com/77cdaac7966c31125e514b7030bf699379c844e9/ui/accessibility/ax_tree_unittest.cc

Comment 4 by katydek@google.com, Sep 19 2017

Components: UI>Accessibility
Owner: katydek@google.com
Status: Fixed (was: Available)

Sign in to add a comment