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

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

Issue 1076453004: Show reasons why nodes are ignored in accessibility sidebar (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 5 years, 8 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 536 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 } 547 }
548 548
549 AccessibilityRole AXTable::roleValue() const 549 AccessibilityRole AXTable::roleValue() const
550 { 550 {
551 if (!isAXTable()) 551 if (!isAXTable())
552 return AXLayoutObject::roleValue(); 552 return AXLayoutObject::roleValue();
553 553
554 return TableRole; 554 return TableRole;
555 } 555 }
556 556
557 bool AXTable::computeAccessibilityIsIgnored() const 557 bool AXTable::computeAccessibilityIsIgnored(PassRefPtr<TypeBuilder::Array<TypeBu ilder::Accessibility::AXProperty>> ignoredReasons) const
558 { 558 {
559 AXObjectInclusion decision = defaultObjectInclusion(); 559 AXObjectInclusion decision = defaultObjectInclusion(ignoredReasons);
560 if (decision == IncludeObject) 560 if (decision == IncludeObject)
561 return false; 561 return false;
562 if (decision == IgnoreObject) 562 if (decision == IgnoreObject)
563 return true; 563 return true;
564 564
565 if (!isAXTable()) 565 if (!isAXTable())
566 return AXLayoutObject::computeAccessibilityIsIgnored(); 566 return AXLayoutObject::computeAccessibilityIsIgnored(ignoredReasons);
567 567
568 return false; 568 return false;
569 } 569 }
570 570
571 String AXTable::deprecatedTitle(TextUnderElementMode mode) const 571 String AXTable::deprecatedTitle(TextUnderElementMode mode) const
572 { 572 {
573 if (!isAXTable()) 573 if (!isAXTable())
574 return AXLayoutObject::deprecatedTitle(mode); 574 return AXLayoutObject::deprecatedTitle(mode);
575 575
576 String title; 576 String title;
577 if (!m_layoutObject) 577 if (!m_layoutObject)
578 return title; 578 return title;
579 579
580 // see if there is a caption 580 // see if there is a caption
581 Node* tableElement = m_layoutObject->node(); 581 Node* tableElement = m_layoutObject->node();
582 if (isHTMLTableElement(tableElement)) { 582 if (isHTMLTableElement(tableElement)) {
583 HTMLTableCaptionElement* caption = toHTMLTableElement(tableElement)->cap tion(); 583 HTMLTableCaptionElement* caption = toHTMLTableElement(tableElement)->cap tion();
584 if (caption) 584 if (caption)
585 title = caption->innerText(); 585 title = caption->innerText();
586 } 586 }
587 587
588 // try the standard 588 // try the standard
589 if (title.isEmpty()) 589 if (title.isEmpty())
590 title = AXLayoutObject::deprecatedTitle(mode); 590 title = AXLayoutObject::deprecatedTitle(mode);
591 591
592 return title; 592 return title;
593 } 593 }
594 594
595 } // namespace blink 595 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698