Bug 130196

Summary: Web Inspector: Add a new layout test for better coverage of accessibility "focused" in inspector-protocol DOM.getAccessibilityPropertiesForNode
Product: WebKit Reporter: James Craig <jcraig>
Component: Web InspectorAssignee: Diego Pino <dpino>
Status: REOPENED ---    
Severity: Normal CC: buildbot, commit-queue, graouts, inspector-bugzilla-changes, rniwa, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on: 129779, 130952    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch
none
Archive of layout-test-results from webkit-cq-02 for mac-mountainlion
none
Archive of layout-test-results from webkit-ews-15 for mac-mountainlion-wk2
none
Archive of layout-test-results from webkit-ews-07 for mac-mountainlion
none
Archive of layout-test-results from webkit-ews-05 for mac-mountainlion
none
Patch none

Description James Craig 2014-03-13 09:38:14 PDT
Web Inspector: Add a new layout test for better coverage of accessibility "focused" in inspector-protocol DOM.getAccessibilityPropertiesForNode

Since "focused" is so dependent on user state, I was thinking something that would load up various focusables:

native links
native form elements (text, button, checkbox, textarea)
contenteditable region
also a few ARIA controls with tabindex values of 0, -1, etc.

Cycle through the different focused states on each control and verify the focused output from DOM.getAccessibilityPropertiesForNode is expected. Might also want to try focusing something that is not focusable (e.g. div:not([tabindex])) and make sure it fails.

Note that native links and buttons are not user focusable (with the Tab key) by default in Safari, but they should always remain "focusable" as far as the accessibility APIs are concerned.
Comment 1 James Craig 2014-03-13 09:40:07 PDT
Diego, would you like to take this one since you worked on the focused/focusable bits? If not, kick it back to unassigned and I'll get to it eventually.
Comment 2 Diego Pino 2014-03-13 10:12:40 PDT
(In reply to comment #1)
> Diego, would you like to take this one since you worked on the focused/focusable bits? If not, kick it back to unassigned and I'll get to it eventually.

Yes sure, nice.
Comment 3 Diego Pino 2014-03-14 10:20:02 PDT
Created attachment 226729 [details]
Patch
Comment 4 Diego Pino 2014-03-14 10:24:57 PDT
I tried to add a non-focusable element and focus on it, with the expectation that focused were false, but what actually happened was that I got a protocol error:

PROTOCOL ERROR: {"code":-32000,"message":"Element is not focusable"}

That means that DOM.focus cannot focus a non-focusable element, and that's the reason why there's no test with "focused: false".
Comment 5 Timothy Hatcher 2014-03-18 12:59:37 PDT
Comment on attachment 226729 [details]
Patch

The result might need rebaselined for new properties.
Comment 6 Radar WebKit Bug Importer 2014-03-18 12:59:58 PDT
<rdar://problem/16357755>
Comment 7 Diego Pino 2014-03-24 09:20:52 PDT
Created attachment 227654 [details]
Patch
Comment 8 WebKit Commit Bot 2014-03-25 16:43:23 PDT
Comment on attachment 227654 [details]
Patch

Rejecting attachment 227654 [details] from commit-queue.

New failing tests:
inspector-protocol/dom/getAccessibilityPropertiesForNode-focused.html
Full output: http://webkit-queues.appspot.com/results/4766140945399808
Comment 9 WebKit Commit Bot 2014-03-25 16:43:25 PDT
Created attachment 227815 [details]
Archive of layout-test-results from webkit-cq-02 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the commit-queue.
Bot: webkit-cq-02  Port: mac-mountainlion  Platform: Mac OS X 10.8.5
Comment 10 Build Bot 2014-03-26 09:58:11 PDT
Comment on attachment 227654 [details]
Patch

Attachment 227654 [details] did not pass mac-wk2-ews (mac-wk2):
Output: http://webkit-queues.appspot.com/results/4668046509604864

New failing tests:
inspector-protocol/dom/getAccessibilityPropertiesForNode-focused.html
Comment 11 Build Bot 2014-03-26 09:58:14 PDT
Created attachment 227856 [details]
Archive of layout-test-results from webkit-ews-15 for mac-mountainlion-wk2

The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: webkit-ews-15  Port: mac-mountainlion-wk2  Platform: Mac OS X 10.8.5
Comment 12 Build Bot 2014-03-26 10:31:28 PDT
Comment on attachment 227654 [details]
Patch

Attachment 227654 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/4707749187289088

New failing tests:
inspector-protocol/dom/getAccessibilityPropertiesForNode-focused.html
Comment 13 Build Bot 2014-03-26 10:31:31 PDT
Created attachment 227859 [details]
Archive of layout-test-results from webkit-ews-07 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-07  Port: mac-mountainlion  Platform: Mac OS X 10.8.5
Comment 14 Build Bot 2014-03-26 11:26:15 PDT
Comment on attachment 227654 [details]
Patch

Attachment 227654 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/4610112769490944

New failing tests:
inspector-protocol/dom/getAccessibilityPropertiesForNode-focused.html
Comment 15 Build Bot 2014-03-26 11:26:18 PDT
Created attachment 227866 [details]
Archive of layout-test-results from webkit-ews-05 for mac-mountainlion

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: webkit-ews-05  Port: mac-mountainlion  Platform: Mac OS X 10.8.5
Comment 16 Diego Pino 2014-03-30 14:45:13 PDT
Created attachment 228132 [details]
Patch
Comment 17 WebKit Commit Bot 2014-03-30 16:00:20 PDT
Comment on attachment 228132 [details]
Patch

Clearing flags on attachment: 228132

Committed r166467: <http://trac.webkit.org/changeset/166467>
Comment 18 WebKit Commit Bot 2014-03-30 16:00:26 PDT
All reviewed patches have been landed.  Closing bug.
Comment 20 WebKit Commit Bot 2014-03-30 20:18:58 PDT
Re-opened since this is blocked by bug 130952