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

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

Issue 2112243004: Ignores ARIA relations (e.g. aria-labelledby) that point to an invisible target. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changed invisible to hidden to match ARIA Implementation Guide. Created 4 years, 5 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 Apple Inc. All rights reserved. 2 * Copyright (C) 2008 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 1251 matching lines...) Expand 10 before | Expand all | Expand 10 after
1262 1262
1263 return AXNodeObject::textAlternative(recursive, inAriaLabelledByTraversal, v isited, nameFrom, relatedObjects, nameSources); 1263 return AXNodeObject::textAlternative(recursive, inAriaLabelledByTraversal, v isited, nameFrom, relatedObjects, nameSources);
1264 } 1264 }
1265 1265
1266 // 1266 //
1267 // ARIA attributes. 1267 // ARIA attributes.
1268 // 1268 //
1269 1269
1270 void AXLayoutObject::ariaFlowToElements(AXObjectVector& flowTo) const 1270 void AXLayoutObject::ariaFlowToElements(AXObjectVector& flowTo) const
1271 { 1271 {
1272 accessibilityChildrenFromAttribute(aria_flowtoAttr, flowTo); 1272 accessibilityChildrenFromAttribute(aria_flowtoAttr, flowTo, false /* include HiddenObjects */);
1273 } 1273 }
1274 1274
1275 void AXLayoutObject::ariaControlsElements(AXObjectVector& controls) const 1275 void AXLayoutObject::ariaControlsElements(AXObjectVector& controls) const
1276 { 1276 {
1277 accessibilityChildrenFromAttribute(aria_controlsAttr, controls); 1277 accessibilityChildrenFromAttribute(aria_controlsAttr, controls, false /* inc ludeHiddenObjects */);
1278 } 1278 }
1279 1279
1280 void AXLayoutObject::ariaOwnsElements(AXObjectVector& owns) const 1280 void AXLayoutObject::ariaOwnsElements(AXObjectVector& owns) const
1281 { 1281 {
1282 accessibilityChildrenFromAttribute(aria_ownsAttr, owns); 1282 accessibilityChildrenFromAttribute(aria_ownsAttr, owns, false /* includeHidd enObjects */);
1283 } 1283 }
1284 1284
1285 void AXLayoutObject::ariaDescribedbyElements(AXObjectVector& describedby) const 1285 void AXLayoutObject::ariaDescribedbyElements(AXObjectVector& describedby) const
1286 { 1286 {
1287 accessibilityChildrenFromAttribute(aria_describedbyAttr, describedby); 1287 accessibilityChildrenFromAttribute(aria_describedbyAttr, describedby, true / * includeHiddenObjects */);
1288 } 1288 }
1289 1289
1290 void AXLayoutObject::ariaLabelledbyElements(AXObjectVector& labelledby) const 1290 void AXLayoutObject::ariaLabelledbyElements(AXObjectVector& labelledby) const
1291 { 1291 {
1292 accessibilityChildrenFromAttribute(aria_labelledbyAttr, labelledby); 1292 accessibilityChildrenFromAttribute(aria_labelledbyAttr, labelledby, true /* includeHiddenObjects */);
1293 } 1293 }
1294 1294
1295 bool AXLayoutObject::ariaHasPopup() const 1295 bool AXLayoutObject::ariaHasPopup() const
1296 { 1296 {
1297 return elementAttributeValue(aria_haspopupAttr); 1297 return elementAttributeValue(aria_haspopupAttr);
1298 } 1298 }
1299 1299
1300 bool AXLayoutObject::ariaRoleHasPresentationalChildren() const 1300 bool AXLayoutObject::ariaRoleHasPresentationalChildren() const
1301 { 1301 {
1302 switch (m_ariaRole) { 1302 switch (m_ariaRole) {
(...skipping 1268 matching lines...) Expand 10 before | Expand all | Expand 10 after
2571 result.unite(labelRect); 2571 result.unite(labelRect);
2572 } 2572 }
2573 } 2573 }
2574 } 2574 }
2575 } 2575 }
2576 2576
2577 return result; 2577 return result;
2578 } 2578 }
2579 2579
2580 } // namespace blink 2580 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698