Changeset 167054 in webkit
- Timestamp:
- Apr 9, 2014 5:18:49 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r167053 r167054 1 2014-04-09 James Craig <jcraig@apple.com> 2 3 AX: Bug in AccessibilityNodeObject::helpText 4 https://bugs.webkit.org/show_bug.cgi?id=130386 5 6 Reviewed by Chris Fleizach. 7 8 Tests accessibility help text in a variety of examples. 9 10 * accessibility/help-text-expected.txt: Added. 11 * accessibility/help-text.html: Added. 12 1 13 2014-04-09 Brent Fulgham <bfulgham@apple.com> 2 14 -
trunk/Source/WebCore/ChangeLog
r167052 r167054 1 2014-04-09 James Craig <jcraig@apple.com> 2 3 AX: Bug in AccessibilityNodeObject::helpText 4 https://bugs.webkit.org/show_bug.cgi?id=130386 5 6 Reviewed by Chris Fleizach. 7 8 Test: accessibility/help-text.html 9 10 Ancestor loop was always checking attribute of original node rather than current node. 11 12 * accessibility/AccessibilityNodeObject.cpp: 13 (WebCore::AccessibilityNodeObject::helpText): 14 1 15 2014-04-09 Chris Fleizach <cfleizach@apple.com> 2 16 -
trunk/Source/WebCore/accessibility/AccessibilityNodeObject.cpp
r166921 r167054 1402 1402 if (!describedBy.isEmpty()) 1403 1403 textOrder.append(AccessibilityText(describedBy, SummaryText)); 1404 1405 // Add help type text that is derived from ancestors. 1406 for (Node* curr = node(); curr; curr = curr->parentNode()) { 1407 const AtomicString& summary = getAttribute(summaryAttr); 1408 if (!summary.isEmpty()) 1409 textOrder.append(AccessibilityText(summary, SummaryText)); 1410 1411 // The title attribute should be used as help text unless it is already being used as descriptive text. 1412 const AtomicString& title = getAttribute(titleAttr); 1413 if (!title.isEmpty()) 1414 textOrder.append(AccessibilityText(title, TitleTagText)); 1415 1416 // Only take help text from an ancestor element if its a group or an unknown role. If help was 1417 // added to those kinds of elements, it is likely it was meant for a child element. 1418 AccessibilityObject* axObj = axObjectCache()->getOrCreate(curr); 1419 if (!axObj) 1420 return; 1421 1422 AccessibilityRole role = axObj->roleValue(); 1423 if (role != GroupRole && role != UnknownRole) 1424 break; 1425 } 1404 1405 // Summary attribute used as help text on tables. 1406 const AtomicString& summary = getAttribute(summaryAttr); 1407 if (!summary.isEmpty()) 1408 textOrder.append(AccessibilityText(summary, SummaryText)); 1409 1410 // The title attribute should be used as help text unless it is already being used as descriptive text. 1411 const AtomicString& title = getAttribute(titleAttr); 1412 if (!title.isEmpty()) 1413 textOrder.append(AccessibilityText(title, TitleTagText)); 1426 1414 } 1427 1415
Note: See TracChangeset
for help on using the changeset viewer.