| Summary: | Web Inspector: Feature check for accessibility support before using it (DOMAgent.getAccessibilityPropertiesForNode) | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Joseph Pecoraro <joepeck> | ||||
| Component: | Web Inspector | Assignee: | Joseph Pecoraro <joepeck> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | graouts, jcraig, joepeck, timothy, webkit-bug-importer | ||||
| Priority: | P2 | ||||||
| Version: | 528+ (Nightly build) | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Bug Depends on: | |||||||
| Bug Blocks: | 129779, 129943, 129952 | ||||||
| Attachments: |
|
||||||
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) Created attachment 226561 [details]
[PATCH] Proposed Fix
|
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.