Bug 193225 - Web Inspector: Audit: provide a way to get related Accessibility nodes for a given node
Summary: Web Inspector: Audit: provide a way to get related Accessibility nodes for a ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Nightly Build
Hardware: All All
: P2 Normal
Assignee: Devin Rousso
URL:
Keywords: InRadar
Depends on: WebInspectorAuditTab 193149
Blocks:
  Show dependency treegraph
 
Reported: 2019-01-07 18:02 PST by Devin Rousso
Modified: 2019-01-22 12:53 PST (History)
14 users (show)

See Also:


Attachments
Patch (13.82 KB, patch)
2019-01-07 19:09 PST, Devin Rousso
hi: commit-queue-
Details | Formatted Diff | Diff
Patch (15.57 KB, patch)
2019-01-07 19:54 PST, Devin Rousso
hi: commit-queue-
Details | Formatted Diff | Diff
Patch (20.97 KB, patch)
2019-01-10 16:25 PST, Devin Rousso
hi: commit-queue-
Details | Formatted Diff | Diff
Patch (21.75 KB, patch)
2019-01-10 18:55 PST, Devin Rousso
no flags Details | Formatted Diff | Diff
Patch (17.03 KB, patch)
2019-01-15 10:16 PST, Devin Rousso
no flags Details | Formatted Diff | Diff
Patch (16.97 KB, patch)
2019-01-15 10:19 PST, Devin Rousso
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews100 for mac-highsierra (2.48 MB, application/zip)
2019-01-15 11:21 PST, EWS Watchlist
no flags Details
Archive of layout-test-results from ews105 for mac-highsierra-wk2 (2.57 MB, application/zip)
2019-01-15 11:33 PST, EWS Watchlist
no flags Details
Archive of layout-test-results from ews112 for mac-highsierra (2.03 MB, application/zip)
2019-01-15 11:57 PST, EWS Watchlist
no flags Details
Patch (17.45 KB, patch)
2019-01-15 17:18 PST, Devin Rousso
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews100 for mac-highsierra (2.60 MB, application/zip)
2019-01-15 18:12 PST, EWS Watchlist
no flags Details
Archive of layout-test-results from ews107 for mac-highsierra-wk2 (2.55 MB, application/zip)
2019-01-15 18:45 PST, EWS Watchlist
no flags Details
Archive of layout-test-results from ews114 for mac-highsierra (2.52 MB, application/zip)
2019-01-15 19:09 PST, EWS Watchlist
no flags Details
Patch (17.21 KB, patch)
2019-01-18 17:19 PST, Devin Rousso
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews103 for mac-highsierra (2.56 MB, application/zip)
2019-01-18 18:02 PST, EWS Watchlist
no flags Details
Archive of layout-test-results from ews114 for mac-highsierra (2.10 MB, application/zip)
2019-01-18 18:44 PST, EWS Watchlist
no flags Details
Archive of layout-test-results from ews107 for mac-highsierra-wk2 (2.88 MB, application/zip)
2019-01-18 19:41 PST, EWS Watchlist
no flags Details
Patch (17.50 KB, patch)
2019-01-19 00:49 PST, Devin Rousso
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews103 for mac-highsierra (2.41 MB, application/zip)
2019-01-19 01:52 PST, EWS Watchlist
no flags Details
Archive of layout-test-results from ews105 for mac-highsierra-wk2 (2.54 MB, application/zip)
2019-01-19 02:05 PST, EWS Watchlist
no flags Details
Archive of layout-test-results from ews117 for mac-highsierra (2.02 MB, application/zip)
2019-01-19 05:36 PST, EWS Watchlist
no flags Details
Patch (17.56 KB, patch)
2019-01-22 10:37 PST, Devin Rousso
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Devin Rousso 2019-01-07 18:02:42 PST
This corresponds to the following `DOM.AccessibilityProperties` properties (except they'd return `Node`s instead of `DOM.NodeId`s):
 - activeDescendantNodeId
 - childNodeIds
 - controlledNodeIds
 - flowedNodeIds
 - mouseEventNodeId
 - ownedNodeIds
 - parentNodeId
 - selectedChildNodeIds
Comment 1 Devin Rousso 2019-01-07 18:02:59 PST
<rdar://problem/46799956>
Comment 2 Devin Rousso 2019-01-07 19:09:40 PST
Created attachment 358565 [details]
Patch
Comment 3 Devin Rousso 2019-01-07 19:54:18 PST
Created attachment 358568 [details]
Patch

Minor test fixes.
Comment 4 Devin Rousso 2019-01-10 16:25:10 PST
Created attachment 358848 [details]
Patch

Throw an error when called outside of a test
Comment 5 Devin Rousso 2019-01-10 18:55:02 PST
Created attachment 358858 [details]
Patch
Comment 6 Joseph Pecoraro 2019-01-14 14:14:59 PST
Comment on attachment 358858 [details]
Patch

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

r=me, earlier patch comments applying.

> Source/WebCore/inspector/InspectorAuditAccessibilityUtilities.cpp:109
> +            if (controlledElement)

Nit: Is this if check necessary, would elementsFromAttribute return a null element?

> Source/WebCore/inspector/InspectorAuditAccessibilityUtilities.cpp:131
> +            if (flowedElement)

Nit: Is this if check necessary, would elementsFromAttribute return a null element?

> Source/WebCore/inspector/InspectorAuditAccessibilityUtilities.cpp:148
> +    }
> +    return nullptr;

Style: Sometimes you don't have a newline before the final return and sometimes you do. Would be nice to be consistent. I'd vote for always having a newline after a closing brace before a final return.

> Source/WebCore/inspector/InspectorAuditAccessibilityUtilities.cpp:164
> +                if (ownedElement)

Nit: Is this if check necessary, would elementsFromAttribute return a null element?
Comment 7 Devin Rousso 2019-01-15 10:06:11 PST
Comment on attachment 358858 [details]
Patch

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

>> Source/WebCore/inspector/InspectorAuditAccessibilityUtilities.cpp:109
>> +            if (controlledElement)
> 
> Nit: Is this if check necessary, would elementsFromAttribute return a null element?

It doesn't look like it, as `elementsFromAttribute` does its own check, but I think this isn't a bad thing to have.
Comment 8 Devin Rousso 2019-01-15 10:16:10 PST
Created attachment 359174 [details]
Patch
Comment 9 Devin Rousso 2019-01-15 10:19:01 PST
Created attachment 359175 [details]
Patch
Comment 10 Joseph Pecoraro 2019-01-15 11:13:59 PST
(In reply to Devin Rousso from comment #7)
> Comment on attachment 358858 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=358858&action=review
> 
> >> Source/WebCore/inspector/InspectorAuditAccessibilityUtilities.cpp:109
> >> +            if (controlledElement)
> > 
> > Nit: Is this if check necessary, would elementsFromAttribute return a null element?
> 
> It doesn't look like it, as `elementsFromAttribute` does its own check, but
> I think this isn't a bad thing to have.

We should never have to write code like:

    if (auto* x : list) {
        if (x)
            ...;
    }

Lets drop them. The originating code in DOMAgent doesn't have these checks.
Comment 11 EWS Watchlist 2019-01-15 11:21:34 PST Comment hidden (obsolete)
Comment 12 EWS Watchlist 2019-01-15 11:21:36 PST Comment hidden (obsolete)
Comment 13 EWS Watchlist 2019-01-15 11:33:34 PST Comment hidden (obsolete)
Comment 14 EWS Watchlist 2019-01-15 11:33:36 PST Comment hidden (obsolete)
Comment 15 EWS Watchlist 2019-01-15 11:57:08 PST Comment hidden (obsolete)
Comment 16 EWS Watchlist 2019-01-15 11:57:10 PST Comment hidden (obsolete)
Comment 17 Devin Rousso 2019-01-15 17:18:30 PST
Created attachment 359232 [details]
Patch
Comment 18 EWS Watchlist 2019-01-15 18:12:13 PST Comment hidden (obsolete)
Comment 19 EWS Watchlist 2019-01-15 18:12:15 PST Comment hidden (obsolete)
Comment 20 EWS Watchlist 2019-01-15 18:45:40 PST Comment hidden (obsolete)
Comment 21 EWS Watchlist 2019-01-15 18:45:42 PST Comment hidden (obsolete)
Comment 22 EWS Watchlist 2019-01-15 19:09:31 PST Comment hidden (obsolete)
Comment 23 EWS Watchlist 2019-01-15 19:09:33 PST Comment hidden (obsolete)
Comment 24 Devin Rousso 2019-01-18 17:19:00 PST
Created attachment 359562 [details]
Patch

Rebase
Comment 25 EWS Watchlist 2019-01-18 18:02:21 PST Comment hidden (obsolete)
Comment 26 EWS Watchlist 2019-01-18 18:02:24 PST Comment hidden (obsolete)
Comment 27 EWS Watchlist 2019-01-18 18:44:29 PST Comment hidden (obsolete)
Comment 28 EWS Watchlist 2019-01-18 18:44:31 PST Comment hidden (obsolete)
Comment 29 EWS Watchlist 2019-01-18 19:41:25 PST Comment hidden (obsolete)
Comment 30 EWS Watchlist 2019-01-18 19:41:27 PST Comment hidden (obsolete)
Comment 31 Devin Rousso 2019-01-19 00:49:55 PST
Created attachment 359596 [details]
Patch
Comment 32 EWS Watchlist 2019-01-19 01:52:01 PST Comment hidden (obsolete)
Comment 33 EWS Watchlist 2019-01-19 01:52:03 PST Comment hidden (obsolete)
Comment 34 EWS Watchlist 2019-01-19 02:04:59 PST Comment hidden (obsolete)
Comment 35 EWS Watchlist 2019-01-19 02:05:01 PST Comment hidden (obsolete)
Comment 36 EWS Watchlist 2019-01-19 05:36:56 PST Comment hidden (obsolete)
Comment 37 EWS Watchlist 2019-01-19 05:36:58 PST Comment hidden (obsolete)
Comment 38 Devin Rousso 2019-01-22 10:37:53 PST
Created attachment 359749 [details]
Patch
Comment 39 WebKit Commit Bot 2019-01-22 12:52:58 PST
Comment on attachment 359749 [details]
Patch

Clearing flags on attachment: 359749

Committed r240277: <https://trac.webkit.org/changeset/240277>
Comment 40 WebKit Commit Bot 2019-01-22 12:53:01 PST
All reviewed patches have been landed.  Closing bug.