Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(94)

Side by Side Diff: Source/core/accessibility/AXNodeObject.cpp

Issue 713873002: Add the case for figure in title() and accessibilityDescription(). (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012, Google Inc. All rights reserved. 2 * Copyright (C) 2012, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 1233 matching lines...) Expand 10 before | Expand all | Expand 10 after
1244 case MenuButtonRole: 1244 case MenuButtonRole:
1245 case MenuItemRole: 1245 case MenuItemRole:
1246 case MenuItemCheckBoxRole: 1246 case MenuItemCheckBoxRole:
1247 case MenuItemRadioRole: 1247 case MenuItemRadioRole:
1248 case RadioButtonRole: 1248 case RadioButtonRole:
1249 case TabRole: 1249 case TabRole:
1250 return textUnderElement(); 1250 return textUnderElement();
1251 // SVGRoots should not use the text under itself as a title. That could incl ude the text of objects like <text>. 1251 // SVGRoots should not use the text under itself as a title. That could incl ude the text of objects like <text>.
1252 case SVGRootRole: 1252 case SVGRootRole:
1253 return String(); 1253 return String();
1254 case FigureRole:
1255 for (AXObject* child = firstChild(); child; child = child->nextSibling() ) {
1256 Node* childNode = child->node();
1257 if (childNode && childNode->hasTagName(figcaptionTag))
1258 return child->textUnderElement();
dmazzoni 2014/11/10 17:16:10 I think this should be child->title() or child->ac
je_julie(Not used) 2014/11/11 15:38:51 Thanks for your idea. I took the 2nd suggestion be
1259 }
1254 default: 1260 default:
1255 break; 1261 break;
1256 } 1262 }
1257 1263
1258 if (isHeading() || isLink()) 1264 if (isHeading() || isLink())
1259 return textUnderElement(); 1265 return textUnderElement();
1260 1266
1261 // If it's focusable but it's not content editable or a known control type, then it will appear to 1267 // If it's focusable but it's not content editable or a known control type, then it will appear to
1262 // the user as a single atomic object, so we should use its text as the defa ult title. 1268 // the user as a single atomic object, so we should use its text as the defa ult title.
1263 if (isGenericFocusableElement()) 1269 if (isGenericFocusableElement())
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
1774 float range = maxValueForRange() - minValueForRange(); 1780 float range = maxValueForRange() - minValueForRange();
1775 float value = valueForRange(); 1781 float value = valueForRange();
1776 1782
1777 value += range * (percentChange / 100); 1783 value += range * (percentChange / 100);
1778 setValue(String::number(value)); 1784 setValue(String::number(value));
1779 1785
1780 axObjectCache()->postNotification(node(), AXObjectCacheImpl::AXValueChanged, true); 1786 axObjectCache()->postNotification(node(), AXObjectCacheImpl::AXValueChanged, true);
1781 } 1787 }
1782 1788
1783 } // namespace blink 1789 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698