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

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

Issue 2386473003: Fix issue with descendants of aria-activedescendant being marked as focusable. (Closed)
Patch Set: Created 4 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 | « no previous file | third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.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) 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 1085 matching lines...) Expand 10 before | Expand all | Expand 10 after
1096 bool AXNodeObject::canSetFocusAttribute() const 1096 bool AXNodeObject::canSetFocusAttribute() const
1097 { 1097 {
1098 Node* node = getNode(); 1098 Node* node = getNode();
1099 if (!node) 1099 if (!node)
1100 return false; 1100 return false;
1101 1101
1102 if (isWebArea()) 1102 if (isWebArea())
1103 return true; 1103 return true;
1104 1104
1105 // Children of elements with an aria-activedescendant attribute should be 1105 // Children of elements with an aria-activedescendant attribute should be
1106 // focusable if they have an ARIA role. 1106 // focusable if they have a (non-presentational) ARIA role.
1107 if (ariaRoleAttribute() != UnknownRole && ancestorExposesActiveDescendant()) 1107 if (!isPresentational() && ariaRoleAttribute() != UnknownRole && ancestorExp osesActiveDescendant())
1108 return true; 1108 return true;
1109 1109
1110 // NOTE: It would be more accurate to ask the document whether setFocusedNod e() would 1110 // NOTE: It would be more accurate to ask the document whether setFocusedNod e() would
1111 // do anything. For example, setFocusedNode() will do nothing if the current focused 1111 // do anything. For example, setFocusedNode() will do nothing if the current focused
1112 // node will not relinquish the focus. 1112 // node will not relinquish the focus.
1113 if (isDisabledFormControl(node)) 1113 if (isDisabledFormControl(node))
1114 return false; 1114 return false;
1115 1115
1116 return node->isElementNode() && toElement(node)->supportsFocus(); 1116 return node->isElementNode() && toElement(node)->supportsFocus();
1117 } 1117 }
(...skipping 1776 matching lines...) Expand 10 before | Expand all | Expand 10 after
2894 return placeholder; 2894 return placeholder;
2895 } 2895 }
2896 2896
2897 DEFINE_TRACE(AXNodeObject) 2897 DEFINE_TRACE(AXNodeObject)
2898 { 2898 {
2899 visitor->trace(m_node); 2899 visitor->trace(m_node);
2900 AXObject::trace(visitor); 2900 AXObject::trace(visitor);
2901 } 2901 }
2902 2902
2903 } // namespace blink 2903 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/accessibility/AXObjectCacheImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698