OLD | NEW |
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 571 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
582 } | 582 } |
583 | 583 |
584 ignoredReasons->push_back(IgnoredReason(AXLabelFor, controlObject)); | 584 ignoredReasons->push_back(IgnoredReason(AXLabelFor, controlObject)); |
585 } | 585 } |
586 return true; | 586 return true; |
587 } | 587 } |
588 | 588 |
589 if (m_layoutObject->isBR()) | 589 if (m_layoutObject->isBR()) |
590 return false; | 590 return false; |
591 | 591 |
| 592 if (isLink()) |
| 593 return false; |
| 594 |
| 595 if (isInPageLinkTarget()) |
| 596 return false; |
| 597 |
592 if (m_layoutObject->isText()) { | 598 if (m_layoutObject->isText()) { |
593 // Static text beneath MenuItems and MenuButtons are just reported along | 599 // Static text beneath MenuItems and MenuButtons are just reported along |
594 // with the menu item, so it's ignored on an individual level. | 600 // with the menu item, so it's ignored on an individual level. |
595 AXObject* parent = parentObjectUnignored(); | 601 AXObject* parent = parentObjectUnignored(); |
596 if (parent && (parent->ariaRoleAttribute() == MenuItemRole || | 602 if (parent && (parent->ariaRoleAttribute() == MenuItemRole || |
597 parent->ariaRoleAttribute() == MenuButtonRole)) { | 603 parent->ariaRoleAttribute() == MenuButtonRole)) { |
598 if (ignoredReasons) | 604 if (ignoredReasons) |
599 ignoredReasons->push_back( | 605 ignoredReasons->push_back( |
600 IgnoredReason(AXStaticTextUsedAsNameFor, parent)); | 606 IgnoredReason(AXStaticTextUsedAsNameFor, parent)); |
601 return true; | 607 return true; |
(...skipping 28 matching lines...) Expand all Loading... |
630 | 636 |
631 if (isLandmarkRelated()) | 637 if (isLandmarkRelated()) |
632 return false; | 638 return false; |
633 | 639 |
634 // Header and footer tags may also be exposed as landmark roles but not | 640 // Header and footer tags may also be exposed as landmark roles but not |
635 // always. | 641 // always. |
636 if (getNode() && | 642 if (getNode() && |
637 (getNode()->hasTagName(headerTag) || getNode()->hasTagName(footerTag))) | 643 (getNode()->hasTagName(headerTag) || getNode()->hasTagName(footerTag))) |
638 return false; | 644 return false; |
639 | 645 |
640 if (isLink()) | |
641 return false; | |
642 | |
643 // all controls are accessible | 646 // all controls are accessible |
644 if (isControl()) | 647 if (isControl()) |
645 return false; | 648 return false; |
646 | 649 |
647 if (ariaRoleAttribute() != UnknownRole) | 650 if (ariaRoleAttribute() != UnknownRole) |
648 return false; | 651 return false; |
649 | 652 |
650 // don't ignore labels, because they serve as TitleUIElements | 653 // don't ignore labels, because they serve as TitleUIElements |
651 Node* node = m_layoutObject->node(); | 654 Node* node = m_layoutObject->node(); |
652 if (isHTMLLabelElement(node)) | 655 if (isHTMLLabelElement(node)) |
(...skipping 1838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2491 | 2494 |
2492 bool AXLayoutObject::elementAttributeValue( | 2495 bool AXLayoutObject::elementAttributeValue( |
2493 const QualifiedName& attributeName) const { | 2496 const QualifiedName& attributeName) const { |
2494 if (!m_layoutObject) | 2497 if (!m_layoutObject) |
2495 return false; | 2498 return false; |
2496 | 2499 |
2497 return equalIgnoringCase(getAttribute(attributeName), "true"); | 2500 return equalIgnoringCase(getAttribute(attributeName), "true"); |
2498 } | 2501 } |
2499 | 2502 |
2500 } // namespace blink | 2503 } // namespace blink |
OLD | NEW |