New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 732218 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Dec 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 1
Type: Bug
Team-Accessibility



Sign in to add a comment

Accessible text word offsets broken when contentEditable combo box contains another object

Project Member Reported by ja...@nvaccess.org, Jun 12 2017

Issue description

Chrome Version: 61.0.3127.0 (Official Build) canary (64-bit)
OS: Windows 10 Version 1703 (OS Build 16199.1000) 64-bit

What steps will reproduce the problem?
(1) Start Chrome and the NVDA screen reader.
(2) Open this URL: data:text/html,<div contenteditable="true" role="combobox"><div>Hello there</div></div>
(3) Focus the contentEditable.
(4) Press control+home to move to the start of the text.
(5) Press control+left arrow to read the first word.
Expected: NVDA should say "Hello"
Actual: NVDA says "H"
(6) Press control+right arrow to move to and read the next word.
Expected: NVDA says "there"
Actual: NVDA says "t"

The word offsets returned from IAccessibleText for offsets 0 and 1 are (0, 1). For offset 2 and later, the returned word offsets are (0, 0).

It seems that when role="combobox" is used, the text is "flattened" into the combo box accessible; the exposed text is "Hello there". When you remove role="combobox", you get a single embedded object character instead (which refers to the accessible for the inner div). So, it seems that word offsets calculation thinks it's dealing with an embedded object character, even thoguh the exposed text is flattened.

I think IAccessibleText on a contentEditable with role="combobox" should behave the same way as a contentEditable with no role (or role="textbox"). That is, it should expose the embedded object character in the combo box accessible.

Impact: This breaks navigating by word when entering text in Facebook Messenger for Chrome + NVDA users.
 
Labels: triage-nektar
Labels: triage-aaron
Cc: nek...@chromium.org
Components: -UI>Accessibility UI>Accessibility>Compatibility
Labels: -Pri-3 Pri-1
Owner: ----
Status: Available (was: Untriaged)
Labels: -triage-aaron -triage-nektar
Owner: nek...@chromium.org
Status: Started (was: Available)
Updating per Nektarios' comments
Project Member

Comment 6 by bugdroid1@chromium.org, Dec 1 2017

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

commit 2c8ba95578d4a31bc7a7bb09c64c6152f6c0b190
Author: Nektarios Paisios <nektar@chromium.org>
Date: Fri Dec 01 02:57:58 2017

Distinguish between plain and rich text fields.

Facebook Messager uses a combo box role with a content editable. Since we are flattening the contents of all combo, search and text box roles, this causes a mismatch between the contents and the AXPositions for e.g. word offsets.
Another problem is that we are relying on various ways to determine whether an object is a text control and if its native or not. With this patch, we unify the logic into a few simple tests that rely on Blink to tell us whether:
A) An object is at the root of a text field.
B) Whether the contents are richly editable.
We need to present plain and rich text contents in a flattened manner on Mac and rich text contents in a non-flatten manner on Win, regardless of the method used to make them plain or rich. For example, it doesn't matter if a content editable, design mode, or the CSS style "user-modify: read-write"  was used, we would still want to show the children on Win. Similarly, if the CSS style "user-modify: plain-text-only" is used we would still want to hide the children on both platforms.
R=aleventhal@chromium.org, dmazzoni@chromium.org

Bug:  732218 
Change-Id: I7b3c56531c8f22fc7622d894d6cf40e4b896bd94
Reviewed-on: https://chromium-review.googlesource.com/734192
Commit-Queue: Nektarios Paisios <nektar@chromium.org>
Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#520824}
[modify] https://crrev.com/2c8ba95578d4a31bc7a7bb09c64c6152f6c0b190/content/browser/accessibility/browser_accessibility.cc
[modify] https://crrev.com/2c8ba95578d4a31bc7a7bb09c64c6152f6c0b190/content/browser/accessibility/browser_accessibility.h
[modify] https://crrev.com/2c8ba95578d4a31bc7a7bb09c64c6152f6c0b190/content/browser/accessibility/browser_accessibility_android.cc
[modify] https://crrev.com/2c8ba95578d4a31bc7a7bb09c64c6152f6c0b190/content/browser/accessibility/browser_accessibility_cocoa.mm
[modify] https://crrev.com/2c8ba95578d4a31bc7a7bb09c64c6152f6c0b190/content/browser/accessibility/browser_accessibility_com_win.cc
[modify] https://crrev.com/2c8ba95578d4a31bc7a7bb09c64c6152f6c0b190/content/browser/accessibility/browser_accessibility_manager.cc
[modify] https://crrev.com/2c8ba95578d4a31bc7a7bb09c64c6152f6c0b190/content/browser/accessibility/browser_accessibility_manager_android.cc
[modify] https://crrev.com/2c8ba95578d4a31bc7a7bb09c64c6152f6c0b190/content/browser/accessibility/browser_accessibility_win_unittest.cc
[modify] https://crrev.com/2c8ba95578d4a31bc7a7bb09c64c6152f6c0b190/content/browser/accessibility/dump_accessibility_tree_browsertest.cc
[modify] https://crrev.com/2c8ba95578d4a31bc7a7bb09c64c6152f6c0b190/content/browser/accessibility/one_shot_accessibility_tree_search.cc
[modify] https://crrev.com/2c8ba95578d4a31bc7a7bb09c64c6152f6c0b190/content/test/data/accessibility/aria/aria-readonly-expected-android.txt
[modify] https://crrev.com/2c8ba95578d4a31bc7a7bb09c64c6152f6c0b190/content/test/data/accessibility/aria/aria-searchbox-expected-mac.txt
[modify] https://crrev.com/2c8ba95578d4a31bc7a7bb09c64c6152f6c0b190/content/test/data/accessibility/aria/aria-searchbox-expected-win.txt
[add] https://crrev.com/2c8ba95578d4a31bc7a7bb09c64c6152f6c0b190/content/test/data/accessibility/aria/aria-searchbox-with-rich-text-expected-android.txt
[add] https://crrev.com/2c8ba95578d4a31bc7a7bb09c64c6152f6c0b190/content/test/data/accessibility/aria/aria-searchbox-with-rich-text-expected-blink.txt
[add] https://crrev.com/2c8ba95578d4a31bc7a7bb09c64c6152f6c0b190/content/test/data/accessibility/aria/aria-searchbox-with-rich-text-expected-mac.txt
[add] https://crrev.com/2c8ba95578d4a31bc7a7bb09c64c6152f6c0b190/content/test/data/accessibility/aria/aria-searchbox-with-rich-text-expected-win.txt
[add] https://crrev.com/2c8ba95578d4a31bc7a7bb09c64c6152f6c0b190/content/test/data/accessibility/aria/aria-searchbox-with-rich-text.html
[modify] https://crrev.com/2c8ba95578d4a31bc7a7bb09c64c6152f6c0b190/content/test/data/accessibility/aria/aria-searchbox-with-selection-expected-mac.txt
[modify] https://crrev.com/2c8ba95578d4a31bc7a7bb09c64c6152f6c0b190/content/test/data/accessibility/aria/aria-searchbox-with-selection-expected-win.txt
[modify] https://crrev.com/2c8ba95578d4a31bc7a7bb09c64c6152f6c0b190/content/test/data/accessibility/aria/aria-textbox-expected-mac.txt
[modify] https://crrev.com/2c8ba95578d4a31bc7a7bb09c64c6152f6c0b190/content/test/data/accessibility/aria/aria-textbox-expected-win.txt
[modify] https://crrev.com/2c8ba95578d4a31bc7a7bb09c64c6152f6c0b190/content/test/data/accessibility/aria/aria-textbox-with-selection-expected-mac.txt
[add] https://crrev.com/2c8ba95578d4a31bc7a7bb09c64c6152f6c0b190/content/test/data/accessibility/aria/aria-textbox-with-selection-expected-win.txt
[modify] https://crrev.com/2c8ba95578d4a31bc7a7bb09c64c6152f6c0b190/content/test/data/accessibility/event/aria-combo-box-collapse-expected-win.txt
[modify] https://crrev.com/2c8ba95578d4a31bc7a7bb09c64c6152f6c0b190/content/test/data/accessibility/event/aria-combo-box-expand-expected-win.txt
[modify] https://crrev.com/2c8ba95578d4a31bc7a7bb09c64c6152f6c0b190/content/test/data/accessibility/event/aria-combo-box-focus-expected-win.txt
[modify] https://crrev.com/2c8ba95578d4a31bc7a7bb09c64c6152f6c0b190/content/test/data/accessibility/event/aria-combo-box-next-expected-win.txt
[modify] https://crrev.com/2c8ba95578d4a31bc7a7bb09c64c6152f6c0b190/content/test/data/accessibility/html/contenteditable-with-embedded-contenteditables-expected-mac.txt
[modify] https://crrev.com/2c8ba95578d4a31bc7a7bb09c64c6152f6c0b190/content/test/data/accessibility/html/contenteditable-with-embedded-contenteditables-expected-win.txt
[modify] https://crrev.com/2c8ba95578d4a31bc7a7bb09c64c6152f6c0b190/content/test/data/accessibility/html/contenteditable-with-no-descendants-expected-android.txt
[modify] https://crrev.com/2c8ba95578d4a31bc7a7bb09c64c6152f6c0b190/content/test/data/accessibility/html/input-datetime-expected-mac.txt
[modify] https://crrev.com/2c8ba95578d4a31bc7a7bb09c64c6152f6c0b190/content/test/data/accessibility/html/input-datetime-expected-win.txt
[modify] https://crrev.com/2c8ba95578d4a31bc7a7bb09c64c6152f6c0b190/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
[modify] https://crrev.com/2c8ba95578d4a31bc7a7bb09c64c6152f6c0b190/third_party/WebKit/Source/modules/accessibility/AXNodeObject.h
[modify] https://crrev.com/2c8ba95578d4a31bc7a7bb09c64c6152f6c0b190/third_party/WebKit/Source/modules/accessibility/AXObject.cpp
[modify] https://crrev.com/2c8ba95578d4a31bc7a7bb09c64c6152f6c0b190/third_party/WebKit/Source/modules/accessibility/AXObject.h
[modify] https://crrev.com/2c8ba95578d4a31bc7a7bb09c64c6152f6c0b190/ui/accessibility/ax_role_properties.cc
[modify] https://crrev.com/2c8ba95578d4a31bc7a7bb09c64c6152f6c0b190/ui/accessibility/ax_role_properties.h
[modify] https://crrev.com/2c8ba95578d4a31bc7a7bb09c64c6152f6c0b190/ui/accessibility/platform/ax_platform_node_base.cc
[modify] https://crrev.com/2c8ba95578d4a31bc7a7bb09c64c6152f6c0b190/ui/accessibility/platform/ax_platform_node_base.h
[modify] https://crrev.com/2c8ba95578d4a31bc7a7bb09c64c6152f6c0b190/ui/accessibility/platform/ax_platform_node_win.cc
[modify] https://crrev.com/2c8ba95578d4a31bc7a7bb09c64c6152f6c0b190/ui/accessibility/platform/ax_snapshot_node_android_platform.cc

Status: Fixed (was: Started)
Labels: win-a11y

Sign in to add a comment