Changeset 51762 in webkit
- Timestamp:
- Dec 7, 2009 6:27:44 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r51760 r51762 1 2009-12-07 Joanmarie Diggs <joanmarie.diggs@gmail.com> 2 3 Reviewed by Xan Lopez. 4 5 https://bugs.webkit.org/show_bug.cgi?id=25524 6 [Gtk] Expose the title attribute to assistive technologies 7 8 * platform/gtk/accessibility/title-and-alt.html: Added. 9 * platform/gtk/accessibility/title-and-alt-expected.txt: Added. 10 1 11 2009-12-07 Oliver Hunt <oliver@apple.com> 2 12 -
trunk/WebCore/ChangeLog
r51758 r51762 1 2009-12-07 Joanmarie Diggs <joanmarie.diggs@gmail.com> 2 3 Reviewed by Xan Lopez. 4 5 https://bugs.webkit.org/show_bug.cgi?id=25524 6 [Gtk] Expose the title attribute to assistive technologies 7 8 Expose 'alt' attribute from images as accessible name. 9 Expose the 'title' core HTML attribute as accessible description. 10 This is a modified version of the original fix submitted by Mario Sanchez Prada, 11 adjusted so that it doesn't impact other platforms. 12 13 * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp: 14 (webkit_accessible_get_name): 15 (webkit_accessible_get_description): 16 1 17 2009-12-07 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> 2 18 -
trunk/WebCore/accessibility/gtk/AccessibilityObjectWrapperAtk.cpp
r51342 r51762 160 160 { 161 161 AccessibilityObject* coreObject = core(object); 162 if (!coreObject->isAccessibilityRenderObject()) 163 return returnString(coreObject->stringValue()); 164 165 AccessibilityRenderObject* renderObject = static_cast<AccessibilityRenderObject*>(coreObject); 162 166 if (coreObject->isControl()) { 163 AccessibilityRenderObject* renderObject = static_cast<AccessibilityRenderObject*>(coreObject);164 167 AccessibilityObject* label = renderObject->correspondingLabelForControlElement(); 165 168 if (label) 166 169 return returnString(nameFromChildren(label)); 167 170 } 171 172 if (renderObject->isImage() || renderObject->isInputImage()) { 173 Node* node = renderObject->renderer()->node(); 174 if (node && node->isHTMLElement()) { 175 // Get the attribute rather than altText String so as not to fall back on title. 176 String alt = static_cast<HTMLElement*>(node)->getAttribute(HTMLNames::altAttr); 177 if (!alt.isEmpty()) 178 return returnString(alt); 179 } 180 } 181 168 182 return returnString(coreObject->stringValue()); 169 183 } … … 172 186 { 173 187 AccessibilityObject* coreObject = core(object); 188 Node* node = 0; 189 if (coreObject->isAccessibilityRenderObject()) 190 node = static_cast<AccessibilityRenderObject*>(coreObject)->renderer()->node(); 191 if (!node || !node->isHTMLElement() || coreObject->ariaRoleAttribute() != UnknownRole) 192 return returnString(coreObject->accessibilityDescription()); 174 193 175 194 // atk_table_get_summary returns an AtkObject. We have no summary object, so expose summary here. 176 if (coreObject->roleValue() == TableRole && coreObject->ariaRoleAttribute() == UnknownRole) { 177 Node* node = static_cast<AccessibilityRenderObject*>(coreObject)->renderer()->node(); 178 if (node && node->isHTMLElement()) { 179 String summary = static_cast<HTMLTableElement*>(node)->summary(); 180 if (!summary.isEmpty()) 181 return returnString(summary); 182 } 183 } 195 if (coreObject->roleValue() == TableRole) { 196 String summary = static_cast<HTMLTableElement*>(node)->summary(); 197 if (!summary.isEmpty()) 198 return returnString(summary); 199 } 200 201 // The title attribute should be reliably available as the object's descripton. 202 // We do not want to fall back on other attributes in its absence. See bug 25524. 203 String title = static_cast<HTMLElement*>(node)->title(); 204 if (!title.isEmpty()) 205 return returnString(title); 184 206 185 207 return returnString(coreObject->accessibilityDescription());
Note: See TracChangeset
for help on using the changeset viewer.