Bug 125592 - AX: make aria-hidden=false work with subtrees
Summary: AX: make aria-hidden=false work with subtrees
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: chris fleizach
URL:
Keywords: InRadar
: 125591 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-12-11 11:22 PST by chris fleizach
Modified: 2013-12-18 12:38 PST (History)
12 users (show)

See Also:


Attachments
patch (6.22 KB, patch)
2013-12-11 11:27 PST, chris fleizach
no flags Details | Formatted Diff | Diff
patch (7.03 KB, patch)
2013-12-13 18:55 PST, chris fleizach
buildbot: commit-queue-
Details | Formatted Diff | Diff
Archive of layout-test-results from webkit-ews-09 for mac-mountainlion-wk2 (449.55 KB, application/zip)
2013-12-13 23:52 PST, Build Bot
no flags Details
patch (7.28 KB, patch)
2013-12-17 10:30 PST, chris fleizach
mario: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description chris fleizach 2013-12-11 11:22:38 PST
All the examples from

http://www.html5accessibility.com/tests/hidden2013.html

should work.

Right now, cases 5 and 6 fail
<p id="e" hidden aria-hidden="false">test html5 hidden</p>
<p id="f" style="display:none" aria-hidden="false">test display:none</p>

Because aria-hidden=false is only applying to the element itself, not the sub-tree below itself
Comment 1 chris fleizach 2013-12-11 11:22:48 PST
<rdar://problem/15574925>
Comment 2 chris fleizach 2013-12-11 11:27:18 PST
Created attachment 218984 [details]
patch
Comment 3 Ian 'Hixie' Hickson 2013-12-11 13:21:49 PST
*** Bug 125591 has been marked as a duplicate of this bug. ***
Comment 4 Ian 'Hixie' Hickson 2013-12-11 13:23:04 PST
Note that making aria-hidden override CSS display:none is controversial over in Mozilla land:
   https://bugzilla.mozilla.org/show_bug.cgi?id=945194
Comment 5 Mario Sanchez Prada 2013-12-13 12:18:01 PST
Comment on attachment 218984 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=218984&action=review

> Source/WebCore/accessibility/AXObjectCache.cpp:980
> +    for (Node* testNode = node; testNode; testNode = testNode->parentNode()) {

Maybe a small comment here indicating that you are doing this to be able to work with subtrees would be helpful

> Source/WebCore/accessibility/AccessibilityNodeObject.cpp:417
> +        if (m_node->parentNode() && m_node->parentNode()->hasTagName(iframeTag) && m_node->parentNode()->renderer())
> +            return true;

Perhaps it would be useful to add a check in the layout test for this situation with iframes, given that you are adding this explicit check here

> Source/WebCore/accessibility/AccessibilityNodeObject.cpp:420
> +        // Whitespace only text elements should be ignored when they have no renderer.
> +        String string = stringValue().stripWhiteSpace().simplifyWhiteSpace();

Shouldn't you be checking that the object has no renderer, as you mention in the comment?

> LayoutTests/accessibility/aria-hidden-false-works-in-subtrees.html:22
> +

Extra line

> LayoutTests/accessibility/aria-hidden-false-works-in-subtrees.html:23
> +    description("This tests that setting a role on an img still allows the alt attribute to be used for the description..");

It looks like this description is not the right one

> LayoutTests/accessibility/aria-hidden-false-works-in-subtrees.html:39
> +

Extra line
Comment 6 chris fleizach 2013-12-13 18:55:10 PST
Created attachment 219219 [details]
patch
Comment 7 Build Bot 2013-12-13 23:52:24 PST
Comment on attachment 219219 [details]
patch

Attachment 219219 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/49108065

New failing tests:
accessibility/aria-hidden-false-works-in-subtrees.html
Comment 8 Build Bot 2013-12-13 23:52:25 PST
Created attachment 219244 [details]
Archive of layout-test-results from webkit-ews-09 for mac-mountainlion-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-09  Port: mac-mountainlion-wk2  Platform: Mac OS X 10.8.5
Comment 9 chris fleizach 2013-12-17 10:30:06 PST
Created attachment 219430 [details]
patch
Comment 10 Mario Sanchez Prada 2013-12-17 11:59:49 PST
Comment on attachment 219430 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=219430&action=review

Lgtm. I've just have a suggestion to replace shouldBe() with debug(), see it below...

> LayoutTests/accessibility/aria-hidden-false-works-in-subtrees.html:35
> +        shouldBe("iframeChild.role", "'AXRole: AXGroup'");

Could you replace this shouldBe() with a debug() line before landing, to make it more cross-platform friendly?
Comment 11 chris fleizach 2013-12-17 12:07:56 PST
(In reply to comment #10)
> (From update of attachment 219430 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=219430&action=review
> 
> Lgtm. I've just have a suggestion to replace shouldBe() with debug(), see it below...
> 
> > LayoutTests/accessibility/aria-hidden-false-works-in-subtrees.html:35
> > +        shouldBe("iframeChild.role", "'AXRole: AXGroup'");
> 
> Could you replace this shouldBe() with a debug() line before landing, to make it more cross-platform friendly?

yep no problem
Comment 12 chris fleizach 2013-12-18 12:38:30 PST
https://trac.webkit.org/changeset/160789