RESOLVED FIXED 146549
AX: <details> element should allow expand/close through AX API
https://bugs.webkit.org/show_bug.cgi?id=146549
Summary AX: <details> element should allow expand/close through AX API
chris fleizach
Reported 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>
Attachments
patch (11.03 KB, patch)
2015-07-02 23:25 PDT, chris fleizach
no flags
patch (11.03 KB, patch)
2015-07-02 23:47 PDT, chris fleizach
mario: review+
chris fleizach
Comment 1 2015-07-02 23:25:48 PDT
WebKit Commit Bot
Comment 2 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.
chris fleizach
Comment 3 2015-07-02 23:47:26 PDT
James Craig
Comment 4 2015-07-06 23:53:53 PDT
dupe of bug 108979?
chris fleizach
Comment 5 2015-07-08 23:42:56 PDT
review?
Mario Sanchez Prada
Comment 6 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 :)
chris fleizach
Comment 7 2015-07-09 11:40:29 PDT
Alex Christensen
Comment 8 2015-07-09 12:45:25 PDT
details-summary.html times out on all bots.
Brent Fulgham
Comment 9 2015-07-09 13:40:14 PDT
This is timing out everywhere. Can you please fix it? Or should we deactivate the test?
Mario Sanchez Prada
Comment 10 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?
chris fleizach
Comment 11 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
chris fleizach
Comment 12 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
Daniel Bates
Comment 13 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(); }
Darin Adler
Comment 14 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!
chris fleizach
Comment 15 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
chris fleizach
Comment 16 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
Note You need to log in before you can comment on or make changes to this bug.