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

Side by Side Diff: third_party/WebKit/Source/modules/accessibility/AXObject.cpp

Issue 1488893002: Stops using SYSTEM_STATE_INDETERMINATE as it makes radio buttons appear to have a mixed state. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed a few test expectations. Created 5 years 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 891 matching lines...) Expand 10 before | Expand all | Expand 10 after
902 case MenuListPopupRole: 902 case MenuListPopupRole:
903 // FIXME: Implement. 903 // FIXME: Implement.
904 return String(); 904 return String();
905 default: 905 default:
906 return emptyString(); 906 return emptyString();
907 } 907 }
908 } 908 }
909 909
910 AccessibilityButtonState AXObject::checkboxOrRadioValue() const 910 AccessibilityButtonState AXObject::checkboxOrRadioValue() const
911 { 911 {
912 // If this is a real checkbox or radio button, AXLayoutObject will handle. 912 const AtomicString& checkedAttribute = getAttribute(aria_checkedAttr);
913 // If it's an ARIA checkbox or radio, the aria-checked attribute should be u sed. 913 if (equalIgnoringCase(checkedAttribute, "true"))
914 return ButtonStateOn;
914 915
915 const AtomicString& result = getAttribute(aria_checkedAttr); 916 if (equalIgnoringCase(checkedAttribute, "mixed")) {
916 if (equalIgnoringCase(result, "true")) 917 // Only checkboxes should support the mixed state.
917 return ButtonStateOn;
918 if (equalIgnoringCase(result, "mixed")) {
919 AccessibilityRole role = ariaRoleAttribute(); 918 AccessibilityRole role = ariaRoleAttribute();
920 if (role == RadioButtonRole || role == MenuItemRadioRole || role == Swit chRole) 919 if (role == CheckBoxRole || role == MenuItemCheckBoxRole)
921 return ButtonStateOff; 920 return ButtonStateMixed;
922 return ButtonStateMixed;
923 } 921 }
924 922
925 return ButtonStateOff; 923 return ButtonStateOff;
926 } 924 }
927 925
928 bool AXObject::isMultiline() const 926 bool AXObject::isMultiline() const
929 { 927 {
930 Node* node = this->node(); 928 Node* node = this->node();
931 if (!node) 929 if (!node)
932 return false; 930 return false;
(...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after
1681 1679
1682 DEFINE_TRACE(AXObject) 1680 DEFINE_TRACE(AXObject)
1683 { 1681 {
1684 visitor->trace(m_children); 1682 visitor->trace(m_children);
1685 visitor->trace(m_parent); 1683 visitor->trace(m_parent);
1686 visitor->trace(m_cachedLiveRegionRoot); 1684 visitor->trace(m_cachedLiveRegionRoot);
1687 visitor->trace(m_axObjectCache); 1685 visitor->trace(m_axObjectCache);
1688 } 1686 }
1689 1687
1690 } // namespace blink 1688 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/modules/accessibility/AXObject.h ('k') | third_party/WebKit/Source/web/AssertMatchingEnums.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698