Commit b27cffd3 authored by Joanmarie Diggs's avatar Joanmarie Diggs

Web: Return next caret context as first caret context for empty anchor

Unfortunately, empty anchors can appear in the accessibility tree.
If caret navigation causes us to land on one, there's nothing to
present. Therefore look for and move to the first presentable thing
after the empty anchor.
parent 0b717295
......@@ -4830,6 +4830,14 @@ class Utilities(script_utilities.Utilities):
debug.println(debug.LEVEL_INFO, msg, True)
return obj, offset + 1
if self.isEmptyAnchor(child):
nextObj, nextOffset = self.nextContext(obj, offset)
if nextObj:
msg = "WEB: First caret context at end of empty anchor %s is next context %s, %i" % \
(obj, nextObj, nextOffset)
debug.println(debug.LEVEL_INFO, msg, True)
return nextObj, nextOffset
if not self._canHaveCaretContext(child):
msg = "WEB: Child cannot be context. Returning %s, %i unchanged." % (obj, offset)
debug.println(debug.LEVEL_INFO, msg, True)
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