Commit 54245a4d authored by Nektarios Paisios's avatar Nektarios Paisios Committed by Commit Bot

Anonymous inline blocks need to be exposed in the accessibility tree if they are richly editable

The IAccessible2 APIs allow an AT to retrieve the caret offset in any object via |get_caretOffset| and ask for the ia2hypertext using |get_text(start-offset, end_offset)|.
None of these APIs return or accept an affinity. This makes it impossible for us to determine which piece of text should be returned when anonymous inline blocks are not used to separate lines.
Anonymous inline block
++Static text "Line 1"
Inline block
++Static text "line 2"
If the anonymous block is ignored in the accessibility tree we get:
Static text "Line 1<embedded object character>"
The text offset for the embedded object character could either refer to the end of line 1 or the beginning of line 2.
R=dmazzoni@chromium.org, aleventhal@chromium.org

Tested: With Jaws by creating a content editable and typing a few lines
Change-Id: Iafcca4ff41796a045b598b95a62e92efdd99f4aa
Reviewed-on: https://chromium-review.googlesource.com/773111
Commit-Queue: Nektarios Paisios <nektar@chromium.org>
Reviewed-by: default avatarDominic Mazzoni <dmazzoni@chromium.org>
Cr-Commit-Position: refs/heads/master@{#517209}
parent d2cc1555
......@@ -504,7 +504,7 @@ bool AXLayoutObject::ComputeAccessibilityIsIgnored(
if (decision == kIgnoreObject)
return true;
if (layout_object_->IsAnonymousBlock())
if (layout_object_->IsAnonymousBlock() && !IsEditable())
return true;
// If this element is within a parent that cannot have children, it should not
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment