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

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

Issue 829473004: When ARIA button contains a link, label text is ignored (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 11 months 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 | « Source/modules/accessibility/AXNodeObject.h ('k') | Source/modules/accessibility/AXObject.h » ('j') | 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 1238 matching lines...) Expand 10 before | Expand all | Expand 10 after
1249 // 1249 //
1250 // The goal is to return a reasonable title for the outer container div, bec ause 1250 // The goal is to return a reasonable title for the outer container div, bec ause
1251 // it's focusable - but without making its title be the full inner text, whi ch is 1251 // it's focusable - but without making its title be the full inner text, whi ch is
1252 // quite long. As a heuristic, skip links, controls, and elements that are u sually 1252 // quite long. As a heuristic, skip links, controls, and elements that are u sually
1253 // containers with lots of children. 1253 // containers with lots of children.
1254 1254
1255 // Skip hidden children 1255 // Skip hidden children
1256 if (obj->isInertOrAriaHidden()) 1256 if (obj->isInertOrAriaHidden())
1257 return false; 1257 return false;
1258 1258
1259 // If something doesn't expose any children, then we can always take the inn er text content.
1260 // This is what we want when someone puts an <a> inside a <button> for examp le.
1261 if (obj->isDescendantOfBarrenParent())
1262 return true;
1263
1259 // Skip focusable children, so we don't include the text of links and contro ls. 1264 // Skip focusable children, so we don't include the text of links and contro ls.
1260 if (obj->canSetFocusAttribute()) 1265 if (obj->canSetFocusAttribute())
1261 return false; 1266 return false;
1262 1267
1263 // Skip big container elements like lists, tables, etc. 1268 // Skip big container elements like lists, tables, etc.
1264 if (obj->isList() || obj->isAXTable() || obj->isTree() || obj->isCanvas()) 1269 if (obj->isList() || obj->isAXTable() || obj->isTree() || obj->isCanvas())
1265 return false; 1270 return false;
1266 1271
1267 return true; 1272 return true;
1268 } 1273 }
(...skipping 675 matching lines...) Expand 10 before | Expand all | Expand 10 after
1944 float range = maxValueForRange() - minValueForRange(); 1949 float range = maxValueForRange() - minValueForRange();
1945 float value = valueForRange(); 1950 float value = valueForRange();
1946 1951
1947 value += range * (percentChange / 100); 1952 value += range * (percentChange / 100);
1948 setValue(String::number(value)); 1953 setValue(String::number(value));
1949 1954
1950 axObjectCache()->postNotification(node(), AXObjectCacheImpl::AXValueChanged, true); 1955 axObjectCache()->postNotification(node(), AXObjectCacheImpl::AXValueChanged, true);
1951 } 1956 }
1952 1957
1953 } // namespace blink 1958 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/accessibility/AXNodeObject.h ('k') | Source/modules/accessibility/AXObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698