Bug 146549 - AX: <details> element should allow expand/close through AX API
Summary: AX: <details> element should allow expand/close through AX API
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
Depends on: 147115
Blocks:
  Show dependency treegraph
 
Reported: 2015-07-02 09:16 PDT by chris fleizach
Modified: 2015-07-20 11:41 PDT (History)
15 users (show)

See Also:


Attachments
patch (11.03 KB, patch)
2015-07-02 23:25 PDT, chris fleizach
no flags Details | Formatted Diff | Diff
patch (11.03 KB, patch)
2015-07-02 23:47 PDT, 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 2015-07-02 09:16:22 PDT
VoiceOver needs a way to expand/collapse (either AXPress or make expanded writable) this group along with a notification when it is expaneded or collapsed (probably ValueChanged)

<rdar://problem/21636810>
Comment 1 chris fleizach 2015-07-02 23:25:48 PDT
Created attachment 256081 [details]
patch
Comment 2 WebKit Commit Bot 2015-07-02 23:28:13 PDT
Attachment 256081 [details] did not pass style-queue:


ERROR: Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:3099:  Boolean expressions that span multiple lines should have their operators on the left side of the line instead of the right side.  [whitespace/operators] [4]
ERROR: Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:3099:  Multi line control clauses should use braces.  [whitespace/braces] [4]
Total errors found: 2 in 10 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 chris fleizach 2015-07-02 23:47:26 PDT
Created attachment 256083 [details]
patch
Comment 4 James Craig 2015-07-06 23:53:53 PDT
dupe of bug 108979?
Comment 5 chris fleizach 2015-07-08 23:42:56 PDT
review?
Comment 6 Mario Sanchez Prada 2015-07-09 02:54:08 PDT
Comment on attachment 256083 [details]
patch

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

Looks good to me, just a minor comment below for consideration before landing

> Source/WebCore/accessibility/AccessibilityNodeObject.cpp:1617
> +        if ((expand && !downcast<HTMLDetailsElement>(node())->isOpen())
> +            || (!expand && downcast<HTMLDetailsElement>(node())->isOpen()))
> +            downcast<HTMLDetailsElement>(node())->toggleOpen();

Maybe you can put downcast<HTMLDetailsElement>(node()) in a variable so that you don't have to repeat that three times. Or just downcast<HTMLDetailsElement>(node())->isOpen(). Or both :)
Comment 7 chris fleizach 2015-07-09 11:40:29 PDT
http://trac.webkit.org/changeset/186598
Comment 8 Alex Christensen 2015-07-09 12:45:25 PDT
details-summary.html times out on all bots.
Comment 9 Brent Fulgham 2015-07-09 13:40:14 PDT
This is timing out everywhere. Can you please fix it? Or should we deactivate the test?
Comment 10 Mario Sanchez Prada 2015-07-09 13:42:20 PDT
(In reply to comment #8)
> details-summary.html times out on all bots.

Perhaps there's an issue with the notifications and finishJSTest() is never called? Maybe some missing bits in WKTR, Chris?
Comment 11 chris fleizach 2015-07-09 16:42:19 PDT
(In reply to comment #10)
> (In reply to comment #8)
> > details-summary.html times out on all bots.
> 
> Perhaps there's an issue with the notifications and finishJSTest() is never
> called? Maybe some missing bits in WKTR, Chris?

Build bot ran it fine, so i'm looking into it now
Comment 12 chris fleizach 2015-07-09 16:44:36 PDT
(In reply to comment #11)
> (In reply to comment #10)
> > (In reply to comment #8)
> > > details-summary.html times out on all bots.
> > 
> > Perhaps there's an issue with the notifications and finishJSTest() is never
> > called? Maybe some missing bits in WKTR, Chris?
> 
> Build bot ran it fine, so i'm looking into it now

Forgot a file

http://trac.webkit.org/changeset/186650
Comment 13 Daniel Bates 2015-07-09 22:26:12 PDT
Comment on attachment 256083 [details]
patch

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

>> Source/WebCore/accessibility/AccessibilityNodeObject.cpp:1617
>> +            downcast<HTMLDetailsElement>(node())->toggleOpen();
> 
> Maybe you can put downcast<HTMLDetailsElement>(node()) in a variable so that you don't have to repeat that three times. Or just downcast<HTMLDetailsElement>(node())->isOpen(). Or both :)

I would have written this as:

if (is<HTMLDetailsElement>(node())) {
    auto& details = downcast<HTMLDetailsElement>(*node());
    if (expand != details.isOpen())
        details.toggleOpen();
}
Comment 14 Darin Adler 2015-07-10 09:24:05 PDT
Comment on attachment 256083 [details]
patch

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

>>> Source/WebCore/accessibility/AccessibilityNodeObject.cpp:1617
>>> +            downcast<HTMLDetailsElement>(node())->toggleOpen();
>> 
>> Maybe you can put downcast<HTMLDetailsElement>(node()) in a variable so that you don't have to repeat that three times. Or just downcast<HTMLDetailsElement>(node())->isOpen(). Or both :)
> 
> I would have written this as:
> 
> if (is<HTMLDetailsElement>(node())) {
>     auto& details = downcast<HTMLDetailsElement>(*node());
>     if (expand != details.isOpen())
>         details.toggleOpen();
> }

Yes, we should update it to be that!
Comment 15 chris fleizach 2015-07-10 09:26:12 PDT
(In reply to comment #14)
> Comment on attachment 256083 [details]
> patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=256083&action=review
> 
> >>> Source/WebCore/accessibility/AccessibilityNodeObject.cpp:1617
> >>> +            downcast<HTMLDetailsElement>(node())->toggleOpen();
> >> 
> >> Maybe you can put downcast<HTMLDetailsElement>(node()) in a variable so that you don't have to repeat that three times. Or just downcast<HTMLDetailsElement>(node())->isOpen(). Or both :)
> > 
> > I would have written this as:
> > 
> > if (is<HTMLDetailsElement>(node())) {
> >     auto& details = downcast<HTMLDetailsElement>(*node());
> >     if (expand != details.isOpen())
> >         details.toggleOpen();
> > }
> 
> Yes, we should update it to be that!

On top of it. Thanks for the comments
Comment 16 chris fleizach 2015-07-10 14:15:11 PDT
(In reply to comment #15)
> (In reply to comment #14)
> > Comment on attachment 256083 [details]
> > patch
> > 
> > View in context:
> > https://bugs.webkit.org/attachment.cgi?id=256083&action=review
> > 
> > >>> Source/WebCore/accessibility/AccessibilityNodeObject.cpp:1617
> > >>> +            downcast<HTMLDetailsElement>(node())->toggleOpen();
> > >> 
> > >> Maybe you can put downcast<HTMLDetailsElement>(node()) in a variable so that you don't have to repeat that three times. Or just downcast<HTMLDetailsElement>(node())->isOpen(). Or both :)
> > > 
> > > I would have written this as:
> > > 
> > > if (is<HTMLDetailsElement>(node())) {
> > >     auto& details = downcast<HTMLDetailsElement>(*node());
> > >     if (expand != details.isOpen())
> > >         details.toggleOpen();
> > > }
> > 
> > Yes, we should update it to be that!
> 
> On top of it. Thanks for the comments

http://trac.webkit.org/changeset/186679