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

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

Issue 783113002: Added test to check the state of ARIA checkboxes. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: tried to commit expectation file once again to have one as a new file not modified Created 6 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
« no previous file with comments | « LayoutTests/accessibility/aria-checkbox-checked-mixed-expected.txt ('k') | 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) 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 366 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 } 377 }
378 378
379 AccessibilityButtonState AXObject::checkboxOrRadioValue() const 379 AccessibilityButtonState AXObject::checkboxOrRadioValue() const
380 { 380 {
381 // If this is a real checkbox or radio button, AXRenderObject will handle. 381 // If this is a real checkbox or radio button, AXRenderObject will handle.
382 // If it's an ARIA checkbox or radio, the aria-checked attribute should be u sed. 382 // If it's an ARIA checkbox or radio, the aria-checked attribute should be u sed.
383 383
384 const AtomicString& result = getAttribute(aria_checkedAttr); 384 const AtomicString& result = getAttribute(aria_checkedAttr);
385 if (equalIgnoringCase(result, "true")) 385 if (equalIgnoringCase(result, "true"))
386 return ButtonStateOn; 386 return ButtonStateOn;
387 if (equalIgnoringCase(result, "mixed")) 387 if (equalIgnoringCase(result, "mixed")) {
388 AccessibilityRole role = ariaRoleAttribute();
389 if (role == RadioButtonRole || role == MenuItemRadioRole)
390 return ButtonStateOff;
388 return ButtonStateMixed; 391 return ButtonStateMixed;
392 }
389 393
390 return ButtonStateOff; 394 return ButtonStateOff;
391 } 395 }
392 396
393 bool AXObject::ariaIsMultiline() const 397 bool AXObject::ariaIsMultiline() const
394 { 398 {
395 return equalIgnoringCase(getAttribute(aria_multilineAttr), "true"); 399 return equalIgnoringCase(getAttribute(aria_multilineAttr), "true");
396 } 400 }
397 401
398 bool AXObject::ariaPressedIsPresent() const 402 bool AXObject::ariaPressedIsPresent() const
(...skipping 573 matching lines...) Expand 10 before | Expand all | Expand 10 after
972 return ToggleButtonRole; 976 return ToggleButtonRole;
973 if (ariaHasPopup()) 977 if (ariaHasPopup())
974 return PopUpButtonRole; 978 return PopUpButtonRole;
975 // We don't contemplate RadioButtonRole, as it depends on the input 979 // We don't contemplate RadioButtonRole, as it depends on the input
976 // type. 980 // type.
977 981
978 return ButtonRole; 982 return ButtonRole;
979 } 983 }
980 984
981 } // namespace blink 985 } // namespace blink
OLDNEW
« no previous file with comments | « LayoutTests/accessibility/aria-checkbox-checked-mixed-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698