Bug 196769

Summary: AX: [ATK] roleIsTextType() is likely missing a bunch of roles
Product: WebKit Reporter: Joanmarie Diggs <jdiggs>
Component: AccessibilityAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: bugs-noreply, cgarcia, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: Linux   

Description Joanmarie Diggs 2019-04-10 09:10:44 PDT
ATK's roleIsTextType() [1] is looking at a very finite number of roles. And most of those are, largely, HTML-based. There are a lot of ARIA roles now. And looking at the AccessibilityRole instances [2], most are not in the list of roles for which roleIsTextType() returns True. What *might* make sense is to instead provide a list of roles which should NOT implement AtkText.

* Widgets which are not text controls should NOT (e.g. radio buttons, checkboxes, etc. should not;
  textareas and other text inputs should).
* WebAreas should NOT (We don't want all text within the WebArea showing up. And that would be a
  performance nightmare.)
* Things that we know don't themselves contain text (e.g. iframes) should NOT.

There's nothing especially bad that would result from having an accessible object implementing AtkText and atk_text_get_text() returning an empty string. On the flip side, it is especially bad if we have an accessible object with text failing to implement AtkText because then we have no way for ATs to get the text; there are no caret-moved events; etc.

[1] At the time of this writing, here:
    https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/accessibility/atk/WebKitAccessible.cpp#L1172
[2] At the time of this writing, here:
    https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/accessibility/AccessibilityObjectInterface.h#L54
Comment 1 Radar WebKit Bug Importer 2019-04-10 09:10:58 PDT
<rdar://problem/49777504>