Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 531a11acbe1b4e901bfde211a7f92d1a912674ea
      
https://github.com/WebKit/WebKit/commit/531a11acbe1b4e901bfde211a7f92d1a912674ea
  Author: Andres Gonzalez <[email protected]>
  Date:   2026-04-24 (Fri, 24 Apr 2026)

  Changed paths:
    M LayoutTests/accessibility/mac/bounds-for-range-expected.txt
    A 
LayoutTests/accessibility/mac/index-for-text-marker-on-non-webarea-element-expected.txt
    A 
LayoutTests/accessibility/mac/index-for-text-marker-on-non-webarea-element.html
    M LayoutTests/accessibility/mac/menu-parameterized-attributes-expected.txt
    M Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm

  Log Message:
  -----------
  AX: All WebAccessibilityObjectWrappers should support AXIndexForTextMarker, 
AXTextMarkerForIndex, and AXTextMarkerIsValid
https://bugs.webkit.org/show_bug.cgi?id=313237
<rdar://problem/175516847>

Reviewed by Tyler Wilcock.

AXIndexForTextMarker, AXTextMarkerForIndex, and AXTextMarkerIsValid were
only advertised as supported parameterized attributes on WebArea elements.
Other elements (e.g., a <br> node with role AXUnknown inside a
contenteditable) did not include these attributes in their
accessibilityParameterizedAttributeNames list, even though the handlers
exist and work for any element.

This caused VoiceOver's braille cursor to fail in Mail compose: the braille
line navigator obtains a line range whose text markers are owned by an inner
element (the <br>), and later toIndexBased asks that element to resolve the
marker to an index. Because the element didn't advertise AXIndexForTextMarker,
the resolution returned NSNotFound, producing no selection and no blinking
cursor on the braille display.

Fix: move the three attributes into the base paramAttrs array so all WebKit
accessibility elements advertise them. Remove the now-redundant 
webAreaParamAttrs
and the isWebArea() special case.

Test: 
LayoutTests/accessibility/mac/index-for-text-marker-on-non-webarea-element.html

Test: accessibility/mac/index-for-text-marker-on-non-webarea-element.html
* LayoutTests/accessibility/mac/bounds-for-range-expected.txt:
* 
LayoutTests/accessibility/mac/index-for-text-marker-on-non-webarea-element-expected.txt:
 Added.
* 
LayoutTests/accessibility/mac/index-for-text-marker-on-non-webarea-element.html:
 Added.
* LayoutTests/accessibility/mac/menu-parameterized-attributes-expected.txt:
* Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityParameterizedAttributeNames]):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to