AX: Hidden nodes which are not directly referenced should not participate name/description from content
https://bugs.webkit.org/show_bug.cgi?id=185478
Reviewed by Chris Fleizach.
Source/WebCore:
Add a check to AccessibilityNodeObject::textUnderElement() and return early
if the node is hidden, not referenced by aria-labelledby or aria-describedby,
not an HTMLLabelElement, and not fallback content for an HTMLCanvasElement.
Test: accessibility/text-alternative-calculation-hidden-nodes.html
* accessibility/AccessibilityNodeObject.cpp:
(WebCore::AccessibilityNodeObject::textUnderElement const):
LayoutTests:
* accessibility/text-alternative-calculation-hidden-nodes-expected.txt: Added.
* accessibility/text-alternative-calculation-hidden-nodes.html: Added.
* platform/gtk/accessibility/text-alternative-calculation-hidden-nodes-expected.txt: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@231620
268f45cc-cd09-0410-ab3c-
d52691b4dbfc