Bug 270354 - [AX][ATSPI] Accessible text implementation should not flatten text from child accessible objects
Summary: [AX][ATSPI] Accessible text implementation should not flatten text from child...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks: 268154
  Show dependency treegraph
 
Reported: 2024-03-01 08:28 PST by Georges Basile Stavracas Neto
Modified: 2024-03-01 08:44 PST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Georges Basile Stavracas Neto 2024-03-01 08:28:54 PST
While working on https://bugs.webkit.org/show_bug.cgi?id=268154, we discovered that the AT-SPI implementation flattens the text of all inner objects. This is not how it's supposed to work, it should build use the object replacement character for non-textual children, and only strictly textual objects should report their text.
Comment 1 Radar WebKit Bug Importer 2024-03-01 08:29:07 PST
<rdar://problem/123901570>
Comment 2 Joanmarie Diggs 2024-03-01 08:44:41 PST
This bug has some significant implications for Orca which uses the text, hypertext, and hyperlink interfaces to turn rich-text content into presentable lines of text.

The way it works is that every child in an element is expected to be represented by a embedded object character. When Orca sees such a character, it uses the hypertext interface to get the child associated with that character. Orca also does the reverse, namely given a child, it uses the hyperlink offset to get that child's position in the parent text. Depending on the current position and circumstances, both of these methods are used to piece together lines of content.

In WebKitGTK's current implementation, there are very few embedded object characters in the flattened text. Furthermore the children sometimes report they have a offset in the parent that neither corresponds to an embedded object character nor to their actual position in the flattened text. The deeper the accessibility tree, the worse the problem can become.

Fixing this issue -- which would make WebKitGTK's text implementation match that of both Gecko and Chromium -- is needed for Orca to apply it's generic web support to WebKitGTK content.