Changeset 50219 in webkit


Ignore:
Timestamp:
Oct 28, 2009 9:53:41 AM (14 years ago)
Author:
eric@webkit.org
Message:

2009-10-28 Joanmarie Diggs <joanmarie.diggs@gmail.com>

Reviewed by Jan Alonzo.

https://bugs.webkit.org/show_bug.cgi?id=25534
[GTK] Objects of ROLE_TABLE should implement the accessible table interface

Expose the table summary as the accessible description because there is no summary object.

  • accessibility/gtk/AccessibilityObjectWrapperAtk.cpp: (webkit_accessible_get_description):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r50215 r50219  
     12009-10-28  Joanmarie Diggs  <joanmarie.diggs@gmail.com>
     2
     3        Reviewed by Jan Alonzo.
     4
     5        https://bugs.webkit.org/show_bug.cgi?id=25534
     6        [GTK] Objects of ROLE_TABLE should implement the accessible table interface
     7
     8        Expose the table summary as the accessible description because there is no summary object.
     9
     10        * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
     11        (webkit_accessible_get_description):
     12
    1132009-10-28  Steve Block  <steveblock@google.com>
    214
  • trunk/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp

    r50208 r50219  
    153153static const gchar* webkit_accessible_get_description(AtkObject* object)
    154154{
    155     // TODO: the Mozilla MSAA implementation prepends "Description: "
    156     // Should we do this too?
    157     return returnString(core(object)->accessibilityDescription());
     155    AccessibilityObject* coreObject = core(object);
     156
     157    // atk_table_get_summary returns an AtkObject. We have no summary object, so expose summary here.
     158    if (coreObject->roleValue() == TableRole && coreObject->ariaRoleAttribute() == UnknownRole) {
     159        Node* node = static_cast<AccessibilityRenderObject*>(coreObject)->renderer()->node();
     160        if (node && node->isHTMLElement()) {
     161            String summary = static_cast<HTMLTableElement*>(node)->summary();
     162            if (!summary.isEmpty())
     163                return returnString(summary);
     164        }
     165    }
     166
     167    return returnString(coreObject->accessibilityDescription());
    158168}
    159169
Note: See TracChangeset for help on using the changeset viewer.