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

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

Issue 1130893007: Aria-required not working for Input elements on Mac & Win. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 7 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 | « LayoutTests/platform/mac/accessibility/input-aria-required-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) 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 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after
1040 if (input.isTextField()) 1040 if (input.isTextField())
1041 return input.isReadOnly(); 1041 return input.isReadOnly();
1042 } 1042 }
1043 1043
1044 return !node->hasEditableStyle(); 1044 return !node->hasEditableStyle();
1045 } 1045 }
1046 1046
1047 bool AXNodeObject::isRequired() const 1047 bool AXNodeObject::isRequired() const
1048 { 1048 {
1049 Node* n = this->node(); 1049 Node* n = this->node();
1050 if (n && (n->isElementNode() && toElement(n)->isFormControlElement())) 1050 if (n && (n->isElementNode() && toElement(n)->isFormControlElement()) && has Attribute(requiredAttr))
1051 return toHTMLFormControlElement(n)->isRequired(); 1051 return toHTMLFormControlElement(n)->isRequired();
1052 1052
1053 if (equalIgnoringCase(getAttribute(aria_requiredAttr), "true")) 1053 if (equalIgnoringCase(getAttribute(aria_requiredAttr), "true"))
1054 return true; 1054 return true;
1055 1055
1056 return false; 1056 return false;
1057 } 1057 }
1058 1058
1059 bool AXNodeObject::canSetFocusAttribute() const 1059 bool AXNodeObject::canSetFocusAttribute() const
1060 { 1060 {
(...skipping 1270 matching lines...) Expand 10 before | Expand all | Expand 10 after
2331 ariaLabeledByElements(elements); 2331 ariaLabeledByElements(elements);
2332 2332
2333 for (const auto& element : elements) { 2333 for (const auto& element : elements) {
2334 RefPtr<AXObject> axElement = axObjectCache()->getOrCreate(element); 2334 RefPtr<AXObject> axElement = axObjectCache()->getOrCreate(element);
2335 textOrder.append(AccessibilityText(ariaLabeledBy, AlternativeText, a xElement)); 2335 textOrder.append(AccessibilityText(ariaLabeledBy, AlternativeText, a xElement));
2336 } 2336 }
2337 } 2337 }
2338 } 2338 }
2339 2339
2340 } // namespace blink 2340 } // namespace blink
OLDNEW
« no previous file with comments | « LayoutTests/platform/mac/accessibility/input-aria-required-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698