[webkit-changes] [WebKit/WebKit] e9f264: AX ITM: VoiceOver only reading "link" for some lin...

AndresGonzalezApple noreply at github.com
Tue Jul 18 14:23:11 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e9f264d34343cd1cc52da62f0435b3eb5bdad751
      https://github.com/WebKit/WebKit/commit/e9f264d34343cd1cc52da62f0435b3eb5bdad751
  Author: Andres Gonzalez <andresg_22 at apple.com>
  Date:   2023-07-18 (Tue, 18 Jul 2023)

  Changed paths:
    A LayoutTests/accessibility/mac/content-editable-attributed-string-expected.txt
    A LayoutTests/accessibility/mac/content-editable-attributed-string.html
    M LayoutTests/platform/mac-wk1/TestExpectations
    M Source/WebCore/accessibility/AXTextMarker.cpp
    M Source/WebCore/accessibility/isolatedtree/mac/AXIsolatedObjectMac.mm
    M Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp
    M Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h
    M Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl
    M Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm

  Log Message:
  -----------
  AX ITM: VoiceOver only reading "link" for some lines when navigating via arrow up and down in contenteditables.
https://bugs.webkit.org/show_bug.cgi?id=259310
rdar://112157851

Reviewed by Tyler Wilcock.

The problem occurs for any <contenteditable> that contains children, e.g., a link or a span. We were returning nil for the AttributedString corresponding to the range of a line containing a child of the contenteditable.
With this patch, if the range is not confined to a single object for which we cache the AttributedString, we fallback to the live objects to extract the attributedString.
In addition, this patch adds several TextMarker related methods to WTR::AccessibilityUIElement for testing purpose.

* LayoutTests/accessibility/mac/content-editable-attributed-string-expected.txt: Added.
* LayoutTests/accessibility/mac/content-editable-attributed-string.html: Added.
* LayoutTests/platform/mac-wk1/TestExpectations:
* Source/WebCore/accessibility/AXTextMarker.cpp:
(WebCore::AXTextMarker::debugDescription const):
* Source/WebCore/accessibility/isolatedtree/mac/AXIsolatedObjectMac.mm:
(WebCore::AXIsolatedObject::attributedStringForTextMarkerRange const):
* Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.cpp:
(WTR::AccessibilityUIElement::rightLineTextMarkerRangeForTextMarker):
(WTR::AccessibilityUIElement::leftLineTextMarkerRangeForTextMarker):
(WTR::AccessibilityUIElement::previousLineStartTextMarkerForTextMarker):
(WTR::AccessibilityUIElement::nextLineEndTextMarkerForTextMarker):
* Tools/WebKitTestRunner/InjectedBundle/AccessibilityUIElement.h:
* Tools/WebKitTestRunner/InjectedBundle/Bindings/AccessibilityUIElement.idl:
* Tools/WebKitTestRunner/InjectedBundle/mac/AccessibilityUIElementMac.mm:
(WTR::AccessibilityUIElement::lineTextMarkerRangeForTextMarker):
(WTR::AccessibilityUIElement::rightLineTextMarkerRangeForTextMarker):
(WTR::AccessibilityUIElement::leftLineTextMarkerRangeForTextMarker):
(WTR::AccessibilityUIElement::previousLineStartTextMarkerForTextMarker):
(WTR::AccessibilityUIElement::nextLineEndTextMarkerForTextMarker):
(WTR::AccessibilityUIElement::previousWordStartTextMarkerForTextMarker):
(WTR::AccessibilityUIElement::nextWordEndTextMarkerForTextMarker):

Canonical link: https://commits.webkit.org/266138@main




More information about the webkit-changes mailing list