Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 86d27022072df830a2b8749ca4a685fd900677d8
      
https://github.com/WebKit/WebKit/commit/86d27022072df830a2b8749ca4a685fd900677d8
  Author: Alan Baradlay <[email protected]>
  Date:   2026-08-21 (Fri, 21 Aug 2026)

  Changed paths:
    A LayoutTests/accessibility/list-marker-content-renderers-text-expected.txt
    A LayoutTests/accessibility/list-marker-content-renderers-text.html
    M Source/WebCore/accessibility/AccessibilityNodeObject.cpp
    M Source/WebCore/accessibility/AccessibilityRenderObject.cpp

  Log Message:
  -----------
  [list-marker] A list marker's text reaches names and values that asked for 
text without list markers
https://bugs.webkit.org/show_bug.cgi?id=322187
<rdar://problem/185422271>

Reviewed by Antti Koivisto.

  <style>
  li { list-style-type: "\627\644\641" }
  </style>
  <ul><li id=item>Item Five
  <a role=button aria-labelledby="button item" id=button>Reply

Whether a marker's text belongs in a name is the caller's to decide, and 
IncludeListMarkerText is how
it says so: aria-labelledby name computation passes No, and textUnderElement() 
answers for the marker
only when it is Yes.

A marker whose text needs bidi resolution does not draw that text itself, it 
keeps it in content
renderers, and those are reachable through 
AccessibilityRenderObject::firstChild(), which answers from
the render tree before it consults canHaveChildren(). The walk that builds a 
name reaches them that
way and takes their text, so the flag stops governing what the caller asked 
about. The name computed
for the button above comes out as "Reply الفItem Five", and the list item's own 
value with it. Neither
the string above nor a right-to-left list of plain decimals is exotic, so this 
is what any
aria-labelledby pointing at such a list item reports today.

* LayoutTests/accessibility/list-marker-content-renderers-text-expected.txt: 
Added.
* LayoutTests/accessibility/list-marker-content-renderers-text.html: Added.
* Source/WebCore/accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::canHaveChildren const):
* Source/WebCore/accessibility/AccessibilityRenderObject.cpp:
(WebCore::AccessibilityRenderObject::textUnderElement const):

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



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

Reply via email to