Bug 128504 - Web Inspector: AXI: more properties: exists, required, and invalid (exists was previously combined with ignored)
Summary: Web Inspector: AXI: more properties: exists, required, and invalid (exists wa...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: James Craig
URL:
Keywords: InRadar
Depends on: 127447
Blocks: 129037
  Show dependency treegraph
 
Reported: 2014-02-09 12:53 PST by James Craig
Modified: 2015-11-30 16:55 PST (History)
5 users (show)

See Also:


Attachments
patch (20.34 KB, patch)
2014-02-14 00:02 PST, James Craig
no flags Details | Formatted Diff | Diff
patch (20.30 KB, patch)
2014-02-14 00:10 PST, James Craig
no flags Details | Formatted Diff | Diff
patch (20.45 KB, patch)
2014-02-14 10:13 PST, James Craig
no flags Details | Formatted Diff | Diff
patch (20.30 KB, patch)
2014-02-16 22:03 PST, James Craig
no flags Details | Formatted Diff | Diff
patch (20.30 KB, patch)
2014-02-16 22:27 PST, James Craig
no flags Details | Formatted Diff | Diff
patch minus the file in question (15.83 KB, patch)
2014-02-16 22:54 PST, James Craig
no flags Details | Formatted Diff | Diff
patch (20.30 KB, patch)
2014-02-16 23:00 PST, James Craig
no flags Details | Formatted Diff | Diff
patch (20.34 KB, patch)
2014-02-16 23:18 PST, James Craig
timothy: review-
Details | Formatted Diff | Diff
patch with review feedback (19.32 KB, patch)
2014-02-17 17:52 PST, James Craig
no flags Details | Formatted Diff | Diff
patch with review feedback (19.35 KB, patch)
2014-02-17 18:04 PST, James Craig
timothy: review+
Details | Formatted Diff | Diff
patch (19.47 KB, patch)
2014-02-18 15:58 PST, James Craig
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description James Craig 2014-02-09 12:53:35 PST
bug 127447 combined "isAccessibilityObject" and "accessibilityIsIgnored", but in hindsight, it'd be good to do these separately. For example, ""<img src="foo" alt=""> still has an accessibility object (and therefore a role) even though the element is ignored in the platform API. Likewise, elements with the presentation role are ignored for the API, but have an object and would be able to indicate more contextual information than just the "No accessibility information" that is conveyed now.
Comment 1 Radar WebKit Bug Importer 2014-02-09 12:53:43 PST
<rdar://problem/16021878>
Comment 2 James Craig 2014-02-10 18:27:09 PST
accessibilityIsIgnored is now just "ignored" in the inspector-protocol for getAccessibilityPropertiesForNode
Comment 3 James Craig 2014-02-13 18:48:46 PST
Calling this "exists" ( was previously combined with ignored), and also adding required and invalid on relevant fields.
Comment 4 James Craig 2014-02-14 00:02:40 PST
Created attachment 224169 [details]
patch
Comment 5 James Craig 2014-02-14 00:10:54 PST
Created attachment 224172 [details]
patch
Comment 6 James Craig 2014-02-14 10:13:02 PST
Created attachment 224230 [details]
patch

fixing apply conflict with TOT
Comment 7 James Craig 2014-02-14 10:16:19 PST
Not sure why this patch is not applying.
Comment 8 Timothy Hatcher 2014-02-14 11:24:52 PST
Seems like your DOMNodeDetailsSidebarPanel.js is out of date.
Comment 9 Timothy Hatcher 2014-02-14 11:25:22 PST
Or this patch depends on another patch that is also up for review and not in TOT yet.
Comment 10 James Craig 2014-02-16 22:03:24 PST
Created attachment 224329 [details]
patch
Comment 11 James Craig 2014-02-16 22:27:32 PST
Created attachment 224330 [details]
patch
Comment 12 James Craig 2014-02-16 22:28:59 PST
I'm up-to-date on all files (the diffs appear clean to me), and this patch doesn't depend on anything that's missing from TOT.
Comment 13 James Craig 2014-02-16 22:40:03 PST
This is frustrating. Iā€™m going to check out a clean copy and reapply the diffs manually.
Comment 14 James Craig 2014-02-16 22:54:31 PST
Created attachment 224331 [details]
patch minus the file in question

Not for submission. Just testing to see if this applies.
Comment 15 James Craig 2014-02-16 23:00:34 PST
Created attachment 224332 [details]
patch
Comment 16 James Craig 2014-02-16 23:03:23 PST
Maybe a bug in ./Tools/Scripts/svn-apply ??
Comment 17 James Craig 2014-02-16 23:18:48 PST
Created attachment 224335 [details]
patch
Comment 18 James Craig 2014-02-16 23:28:00 PST
That's better. The diffs were identical, but it seems svn-apply wasn't able to handle a regular diff without the extra symbols added by svn-create-patch.
Comment 19 Timothy Hatcher 2014-02-17 11:53:11 PST
Comment on attachment 224335 [details]
patch

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

> Source/WebCore/inspector/protocol/DOM.json:68
> +                { "name": "required", "type": "boolean", "description": "Returns whether the element is required or not required." },
> +                { "name": "role", "type": "string", "description": "Computed value for first recognized role token, default role per element, or overridden role." },
> +                { "name": "supportsRequired", "type": "boolean", "description": "Returns whether the required state is relevant for this element (form fields, etc)." },

"required" can be marked optional. And if it is supported, it can be included. The front-end can check for the existence of required using: "required" in axobj or axobj.required !== undefined.

> Source/WebInspectorUI/UserInterface/DOMNodeDetailsSidebarPanel.js:245
> +        function accessibilityPropertiesCallback(props)

accessibilityProperties is better. We don't abbreviate in WebKit.

> Source/WebInspectorUI/UserInterface/DOMNodeDetailsSidebarPanel.js:253
> +                var ignored = (props.ignored ? "true" : "");
> +                var invalid = (props.invalid && props.invalid !== "false" ? props.invalid : "");

WebKit style drops the parens in these cases.

> Source/WebInspectorUI/UserInterface/DOMNodeDetailsSidebarPanel.js:260
> +                var required = (props.supportsRequired ? (props.required ? "true" : "false") : "");

No need for the outer parens.

> Source/WebInspectorUI/UserInterface/DOMNodeDetailsSidebarPanel.js:276
> +                this._accessibilityNodeIgnoredRow.value = ignored;
> +                this._accessibilityNodeInvalidRow.value = invalid;
> +                this._accessibilityNodeLabelRow.value = label;
> +                this._accessibilityNodeRequiredRow.value = required;
> +                this._accessibilityNodeRoleRow.value = role;

ignored and required look like they are "true" and "false" strings. Those user visible strings should be WebInspector.UIStrings. Something like "Yes" and "No" would be nicer and can be localized.
Comment 20 chris fleizach 2014-02-17 12:05:33 PST
Comment on attachment 224335 [details]
patch

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

> Source/WebCore/inspector/InspectorDOMAgent.cpp:1434
> +                required =  axObject->isRequired();

wrong spacing after "="
Comment 21 James Craig 2014-02-17 16:32:47 PST
(In reply to comment #19)
> > Source/WebInspectorUI/UserInterface/DOMNodeDetailsSidebarPanel.js:245
> > +        function accessibilityPropertiesCallback(props)
> 
> accessibilityProperties is better. We don't abbreviate in WebKit.

I was trying to reduce redundancy as suggested in the previous bug. If "accessibilityProperties" is the only argument of the "accessibilityPropertiesCallback" callback, why should it be so verbose?
Comment 22 James Craig 2014-02-17 17:52:50 PST
Created attachment 224450 [details]
patch with review feedback
Comment 23 James Craig 2014-02-17 18:00:23 PST
Comment on attachment 224450 [details]
patch with review feedback

Actually, I'm going to wrap the block of optional attrs in an "exists" conditional. Marking previous as obsolete.
Comment 24 James Craig 2014-02-17 18:04:59 PST
Created attachment 224453 [details]
patch with review feedback
Comment 25 Timothy Hatcher 2014-02-18 13:18:29 PST
Comment on attachment 224453 [details]
patch with review feedback

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

> Source/WebCore/inspector/InspectorDOMAgent.cpp:1443
>          .setNodeId(pushNodePathToFrontend(node));
> -
> +    if (exists) {

An empty line here helps readability.

> Source/WebInspectorUI/UserInterface/DOMNodeDetailsSidebarPanel.js:291
> +                ];
>                  this._accessibilityEmptyRow.hideEmptyMessage();

An empty line here would be nice.
Comment 26 James Craig 2014-02-18 15:58:13 PST
Created attachment 224562 [details]
patch
Comment 27 WebKit Commit Bot 2014-02-18 16:39:53 PST
Comment on attachment 224562 [details]
patch

Clearing flags on attachment: 224562

Committed r164332: <http://trac.webkit.org/changeset/164332>
Comment 28 WebKit Commit Bot 2014-02-18 16:39:56 PST
All reviewed patches have been landed.  Closing bug.