Bug 196769 - AX: [ATK] roleIsTextType() is likely missing a bunch of roles
Summary: AX: [ATK] roleIsTextType() is likely missing a bunch of roles
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: WebKit Nightly Build
Hardware: All Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-04-10 09:10 PDT by Joanmarie Diggs
Modified: 2019-04-11 01:23 PDT (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 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>