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

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

Issue 588653003: Adding support for ARIA 1.1 role="none" (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 3 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
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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 { "main", MainRole }, 88 { "main", MainRole },
89 { "marquee", MarqueeRole }, 89 { "marquee", MarqueeRole },
90 { "math", MathRole }, 90 { "math", MathRole },
91 { "menu", MenuRole }, 91 { "menu", MenuRole },
92 { "menubar", MenuBarRole }, 92 { "menubar", MenuBarRole },
93 { "menuitem", MenuItemRole }, 93 { "menuitem", MenuItemRole },
94 { "menuitemcheckbox", MenuItemRole }, 94 { "menuitemcheckbox", MenuItemRole },
95 { "menuitemradio", MenuItemRole }, 95 { "menuitemradio", MenuItemRole },
96 { "note", NoteRole }, 96 { "note", NoteRole },
97 { "navigation", NavigationRole }, 97 { "navigation", NavigationRole },
98 { "none", NoneRole },
98 { "option", ListBoxOptionRole }, 99 { "option", ListBoxOptionRole },
99 { "presentation", PresentationalRole }, 100 { "presentation", PresentationalRole },
100 { "progressbar", ProgressIndicatorRole }, 101 { "progressbar", ProgressIndicatorRole },
101 { "radio", RadioButtonRole }, 102 { "radio", RadioButtonRole },
102 { "radiogroup", RadioGroupRole }, 103 { "radiogroup", RadioGroupRole },
103 { "region", RegionRole }, 104 { "region", RegionRole },
104 { "row", RowRole }, 105 { "row", RowRole },
105 { "scrollbar", ScrollBarRole }, 106 { "scrollbar", ScrollBarRole },
106 { "search", SearchRole }, 107 { "search", SearchRole },
107 { "separator", SplitterRole }, 108 { "separator", SplitterRole },
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 return IncludeObject; 290 return IncludeObject;
290 291
291 return DefaultBehavior; 292 return DefaultBehavior;
292 } 293 }
293 294
294 AXObjectInclusion AXObject::defaultObjectInclusion() const 295 AXObjectInclusion AXObject::defaultObjectInclusion() const
295 { 296 {
296 if (isInertOrAriaHidden()) 297 if (isInertOrAriaHidden())
297 return IgnoreObject; 298 return IgnoreObject;
298 299
299 if (isPresentationalChildOfAriaRole()) 300 if (isNoneOrPresentationalChildOfAriaRole())
shreeramk 2014/09/20 12:39:36 same query as mentioned in AXObject.h
300 return IgnoreObject; 301 return IgnoreObject;
301 302
302 return accessibilityPlatformIncludesObject(); 303 return accessibilityPlatformIncludesObject();
303 } 304 }
304 305
305 bool AXObject::isInertOrAriaHidden() const 306 bool AXObject::isInertOrAriaHidden() const
306 { 307 {
307 bool mightBeInInertSubtree = true; 308 bool mightBeInInertSubtree = true;
308 for (const AXObject* object = this; object; object = object->parentObject()) { 309 for (const AXObject* object = this; object; object = object->parentObject()) {
309 if (equalIgnoringCase(object->getAttribute(aria_hiddenAttr), "true")) 310 if (equalIgnoringCase(object->getAttribute(aria_hiddenAttr), "true"))
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
893 return ToggleButtonRole; 894 return ToggleButtonRole;
894 if (ariaHasPopup()) 895 if (ariaHasPopup())
895 return PopUpButtonRole; 896 return PopUpButtonRole;
896 // We don't contemplate RadioButtonRole, as it depends on the input 897 // We don't contemplate RadioButtonRole, as it depends on the input
897 // type. 898 // type.
898 899
899 return ButtonRole; 900 return ButtonRole;
900 } 901 }
901 902
902 } // namespace blink 903 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698