Bug 129779

Summary: Web Inspector: AXI: Expose focused/focusable state in the Accessibility Node Inspector
Product: WebKit Reporter: James Craig <jcraig>
Component: Web InspectorAssignee: Diego Pino <dpino>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, graouts, jcraig, joepeck, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on: 129781, 130037    
Bug Blocks: 130196, 129952    
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch none

James Craig
Reported 2014-03-05 21:59:09 PST
Web Inspector: AXI: Expose focused/focusable state in the Accessibility Node Inspector
Attachments
Patch (8.80 KB, patch)
2014-03-07 04:11 PST, Diego Pino
no flags
Patch (13.27 KB, patch)
2014-03-12 02:26 PDT, Diego Pino
no flags
Patch (13.30 KB, patch)
2014-03-12 03:43 PDT, Diego Pino
no flags
Patch (13.46 KB, patch)
2014-03-13 08:12 PDT, Diego Pino
no flags
James Craig
Comment 1 2014-03-05 22:05:03 PST
Diego Pino
Comment 2 2014-03-07 04:11:40 PST
James Craig
Comment 3 2014-03-07 15:32:07 PST
If a bug is already assigned, please contact the assignee before taking it for a patch. I hadn't done any work on this yet, but we could have duplicated efforts. Reassigning this one to you for the time being. R- because the utility needed here is whether an element is focusable, not just focused. You'll want to add a "supportsFocus(ed)" or "focusable" bool in InspectorDOMAgent.cpp that gets assigned if the element is focusable, and only assign send back the focused value if it's focusable. Then use the booleanValueToLocalizedStringIfPropertyDefined("focused") helper function (coming in patch for bug 129781) and display either value in the client as long as it's not undefined. Note: there may be some merge conflicts with bug 129781, too. Hopefully that doesn't slow you down too much. Thanks for starting on this, just let me know next time if it's already assigned. Please update the Layout Test, too: inspector-protocol/dom/getAccessibilityPropertiesForNode.html
James Craig
Comment 4 2014-03-07 15:35:26 PST
I'm getting site errors when attempting to r- and cq-. This is just a note to reviewers to not r+ this one yet.
Joseph Pecoraro
Comment 5 2014-03-10 21:54:18 PDT
Comment on attachment 226113 [details] Patch r- based on James Craig's comments.
Diego Pino
Comment 6 2014-03-11 05:25:03 PDT
(In reply to comment #3) > If a bug is already assigned, please contact the assignee before taking it for a patch. I hadn't done any work on this yet, but we could have duplicated efforts. Reassigning this one to you for the time being. > Sorry, I didn't realise it was assigned. Completely agree with your point of view. > R- because the utility needed here is whether an element is focusable, not just focused. You'll want to add a "supportsFocus(ed)" or "focusable" bool in InspectorDOMAgent.cpp that gets assigned if the element is focusable, and only assign send back the focused value if it's focusable. Then use the booleanValueToLocalizedStringIfPropertyDefined("focused") helper function (coming in patch for bug 129781) and display either value in the client as long as it's not undefined. Note: there may be some merge conflicts with bug 129781, too. Hopefully that doesn't slow you down too much. Thanks for starting on this, just let me know next time if it's already assigned. OK, I'll redo the patch according to those instructions. Thanks for the explanation. > > Please update the Layout Test, too: inspector-protocol/dom/getAccessibilityPropertiesForNode.html OK.
Diego Pino
Comment 7 2014-03-12 02:26:02 PDT
James Craig
Comment 8 2014-03-12 03:19:46 PDT
Comment on attachment 226486 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=226486&action=review The rest looks okay to me. > Source/WebCore/inspector/protocol/DOM.json:66 > + { "name": "focused", "type": "boolean", "optional": true, "description": "Focused state." }, "Focused state. Only defined on focusable elements."
Diego Pino
Comment 9 2014-03-12 03:43:38 PDT
Joseph Pecoraro
Comment 10 2014-03-12 10:47:58 PDT
Comment on attachment 226491 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=226491&action=review > LayoutTests/inspector-protocol/dom/getAccessibilityPropertiesForNode-expected.txt:91 > exists: true > label: > role: > + focused: false > ignored: true > ignoredByDefault: true > hidden: true The tests all have focused: false. Would be nice to include a test where focused is true. Would it be sufficient to just do inputElement.focus() in the test? r=me
Joseph Pecoraro
Comment 11 2014-03-12 10:48:34 PDT
Let me know if you need me to cq+
James Craig
Comment 12 2014-03-12 11:15:33 PDT
Comment on attachment 226491 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=226491&action=review >> LayoutTests/inspector-protocol/dom/getAccessibilityPropertiesForNode-expected.txt:91 >> hidden: true > > The tests all have focused: false. Would be nice to include a test where focused is true. Would it be sufficient to just do inputElement.focus() in the test? > > r=me That'd be good, but I don't know if it's necessary for this one. I think we'll want a second test (in a later bug, not this one) to test all the iterations of focused/focusable on various elements.
Diego Pino
Comment 13 2014-03-12 12:46:39 PDT
(In reply to comment #11) > Let me know if you need me to cq+ Yes please :)
James Craig
Comment 14 2014-03-13 02:01:48 PDT
Just an FYI that you'll need to post another conflict resolution due to the patch for bug 130037. Normally this would not have been a problem, but the commit bot has been down this week.
Diego Pino
Comment 15 2014-03-13 08:12:16 PDT
WebKit Commit Bot
Comment 16 2014-03-13 18:58:32 PDT
Comment on attachment 226593 [details] Patch Clearing flags on attachment: 226593 Committed r165590: <http://trac.webkit.org/changeset/165590>
WebKit Commit Bot
Comment 17 2014-03-13 18:58:36 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.