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

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

Issue 662313003: Add isExpanded() API to WebAXObject.h to get aria-expanded attribute. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 2 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/core/accessibility/AXObject.h ('k') | Source/web/WebAXObject.cpp » ('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) 2008, 2009, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2009, 2011 Apple 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 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 case TabRole: 239 case TabRole:
240 case TextAreaRole: 240 case TextAreaRole:
241 case TextFieldRole: 241 case TextFieldRole:
242 case ToggleButtonRole: 242 case ToggleButtonRole:
243 return true; 243 return true;
244 default: 244 default:
245 return false; 245 return false;
246 } 246 }
247 } 247 }
248 248
249 bool AXObject::isExpanded() const
250 {
251 if (equalIgnoringCase(getAttribute(aria_expandedAttr), "true"))
252 return true;
253
254 return false;
255 }
256
257 bool AXObject::accessibilityIsIgnored() const 249 bool AXObject::accessibilityIsIgnored() const
258 { 250 {
259 AXObjectCache* cache = axObjectCache(); 251 AXObjectCache* cache = axObjectCache();
260 if (!cache) 252 if (!cache)
261 return true; 253 return true;
262 254
263 AXComputedObjectAttributeCache* attributeCache = cache->computedObjectAttrib uteCache(); 255 AXComputedObjectAttributeCache* attributeCache = cache->computedObjectAttrib uteCache();
264 if (attributeCache) { 256 if (attributeCache) {
265 AXObjectInclusion ignored = attributeCache->getIgnored(axObjectID()); 257 AXObjectInclusion ignored = attributeCache->getIgnored(axObjectID());
266 switch (ignored) { 258 switch (ignored) {
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after
924 return ToggleButtonRole; 916 return ToggleButtonRole;
925 if (ariaHasPopup()) 917 if (ariaHasPopup())
926 return PopUpButtonRole; 918 return PopUpButtonRole;
927 // We don't contemplate RadioButtonRole, as it depends on the input 919 // We don't contemplate RadioButtonRole, as it depends on the input
928 // type. 920 // type.
929 921
930 return ButtonRole; 922 return ButtonRole;
931 } 923 }
932 924
933 } // namespace blink 925 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/accessibility/AXObject.h ('k') | Source/web/WebAXObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698