RESOLVED FIXED 130037
Web Inspector: Feature check for accessibility support before using it (DOMAgent.getAccessibilityPropertiesForNode)
https://bugs.webkit.org/show_bug.cgi?id=130037
Summary Web Inspector: Feature check for accessibility support before using it (DOMAg...
Joseph Pecoraro
Reported 2014-03-10 14:05:16 PDT
DOMAgent.getAccessibilityPropertiesForNode won't exist on iOS 6 and 7 remote inspector backends. It looks like our frontend will add UI and unconditionally ask for accessibility information. This will throw an exception inspecting an iOS 6 or iOS 7 device and cause issues. I think Views/DOMNodeDetailsSidebarPanel.js should add an "_accessibilitySupported() { return !!DOMAgent.getAccessibilityPropertiesForNode; }" function, and only add the UI / refresh accessibility when it is supported.
Attachments
[PATCH] Proposed Fix (7.74 KB, patch)
2014-03-12 17:09 PDT, Joseph Pecoraro
timothy: review+
Joseph Pecoraro
Comment 1 2014-03-12 17:07:39 PDT
Yep: Inspecting an iOS 6 device with ToT I see: [Error] TypeError: undefined is not a function (evaluating 'DOMAgent.getAccessibilityPropertiesForNode(this.id, accessibilityPropertiesCallback.bind(this))') accessibilityProperties (DOMNode.js, line 467) refreshAX (DOMNodeDetailsSidebarPanel.js, line 377) refresh (DOMNodeDetailsSidebarPanel.js, line 101) shown (DetailsSidebarPanel.js, line 60) selectedSidebarPanel (Sidebar.js, line 148) _contentBrowserRepresentedObjectsDidChange (Main.js, line 1124) dispatch (Object.js, line 180) dispatchEventToListeners (Object.js, line 187) _dispatchCurrentRepresentedObjectsDidChangeEvent (ContentBrowser.js, line 461) (anonymous function) ([native code], line 0)
Joseph Pecoraro
Comment 2 2014-03-12 17:09:44 PDT
Created attachment 226561 [details] [PATCH] Proposed Fix
Joseph Pecoraro
Comment 3 2014-03-12 17:35:59 PDT
Note You need to log in before you can comment on or make changes to this bug.