AX: [ATK] caret-moved not emitted by text directly in html body
https://bugs.webkit.org/show_bug.cgi?id=131933
Summary AX: [ATK] caret-moved not emitted by text directly in html body
Jarek Czekalski
Reported 2014-04-21 04:35:37 PDT
Created attachment 229799 [details] patch with a test case Under some circumstances text enclosed directly in <body> does not behave like text. atk_text_set_caret_offset does not allow to position the cursor inside it and caret-moved events are not emitted. The simple example is as follows: <html><body> <div>div1</div>abc<div>div2</div> </body></html> Divs are accessible, but the text between them is not. If there were no misleading divs, the text alone is accessible. Once a div after or before is added, the problem arises. I prepared a test case for that. To make such tests easier I prepared a helper testWebkitAtkCaretWalk method. So in this testatk.c diff there is also a test case for bug #130941 included. The name of the test for this bug report is caretInBody.
Attachments
patch with a test case (6.73 KB, patch)
2014-04-21 04:35 PDT, Jarek Czekalski
no flags
Radar WebKit Bug Importer
Comment 1 2014-04-21 04:37:14 PDT
Jarek Czekalski
Comment 2 2014-04-26 08:07:17 PDT
First clue. In Source/WebCore/accessibility/AccessibilityRenderObject.cpp, function AccessibilityRenderObject::textUnderElement, line 664, we have a comment: // For anonymous blocks, we work around not having a direct node to create a range from // defining one based in the two external positions defining the boundaries of the subtree. But when we set cursor position, we rely on visiblePositionForIndex, the same file, line 1859. There it returns empty position for anonymous blocks (!node).
Note You need to log in before you can comment on or make changes to this bug.