After fixing bug 99502, the following functions from AccessibilityObject got deprecated: virtual String accessibilityDescription() const { return String(); } virtual String title() const { return String(); } virtual String helpText() const { return String(); } They should be replaced in the ATK wrapper with code using the new AccessibilityText based API.
Created attachment 169888 [details] Patch proposal
Comment on attachment 169888 [details] Patch proposal View in context: https://bugs.webkit.org/attachment.cgi?id=169888&action=review just one inline question... I think changes look good for the first pass to ensure compatibility. Going forward GTK will probably want to adapt to provide better behavior and a way to expose aria-help, aria-describedby, summary and a few other types of text > Source/WebCore/accessibility/gtk/WebKitAccessibleUtil.cpp:102 > + return String(); this snippet is a Mac concept. Just want to make sure it also applies to GTK
Comment on attachment 169888 [details] Patch proposal View in context: https://bugs.webkit.org/attachment.cgi?id=169888&action=review > Source/WebCore/accessibility/gtk/WebKitAccessibleUtil.cpp:125 > + // probably be in the description field since it's not "visible". This also sounds Mac-specific. Does ATK have the similar rule? On Mac, the basic rule seems to be: * Title = whatever's visible, unless overridden * Description = alternate text On Windows, the basic rule would be described as: * Name = primary title * Description = secondary title I thought ATK was more similar to Windows in this regard. The implementation I'm planning for Chromium (Win and hopefully ATK) is simpler - just take the first valid string for the name, second valid string for the description. Of course, that's likely to break some tests. That's why I'd like to see a test helper function that's cross-platform rather than testing title/description as if they were cross-platform when in reality they differ.
Thanks both for the review and comments. (In reply to comment #2) > [...] > just one inline question... > I think changes look good for the first pass to ensure compatibility. > Going forward GTK will probably want to adapt to provide better behavior > and a way to expose aria-help, aria-describedby, summary and a few other > types of text Yes, that's the idea: to stop using that old API for the moment, to later on make the most of it to more accurately assign the accessible name and description for each element. > > Source/WebCore/accessibility/gtk/WebKitAccessibleUtil.cpp:102 > > + return String(); > > this snippet is a Mac concept. Just want to make sure it also applies to GTK Good point. Actually, I think we can safely remove that since in ATK an object with StaticTextRole won't ever be exposed on its own, but by means of its parent accessibility object, wrapped by an object implementing AtkText. Will remove that before landing (keeps passing tests). (In reply to comment #3) > (From update of attachment 169888 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=169888&action=review > > > Source/WebCore/accessibility/gtk/WebKitAccessibleUtil.cpp:125 > > + // probably be in the description field since it's not "visible". > > This also sounds Mac-specific. Does ATK have the similar rule? I think for the particular case of images the same rule apply here. Thus, I would leave it as is now, and we could always fix it later if we need it. > On Mac, the basic rule seems to be: > * Title = whatever's visible, unless overridden > * Description = alternate text > > On Windows, the basic rule would be described as: > * Name = primary title > * Description = secondary title > > I thought ATK was more similar to Windows in this regard. I also think ATK leans more towards Windows than to mac in this regard, still not being exactly the same thing. Joanie can probably drop some more light on this regard, as she surely will know better. > The implementation I'm planning for Chromium (Win and hopefully ATK) is > simpler - just take the first valid string for the name, second valid string > for the description. > > Of course, that's likely to break some tests. That's why I'd like to see > a test helper function that's cross-platform rather than testing > title/description as if they were cross-platform when in reality they differ. Makes sense, although I'm not completely sure that approach will always work anyway. Will probably need to keep some "special cases" for ATK, I'm afraid.
Committed r132091: <http://trac.webkit.org/changeset/132091>