RESOLVED FIXED 161394
AX: WKWebView for macOS does not allow configuration of tabsToLinks
https://bugs.webkit.org/show_bug.cgi?id=161394
Summary AX: WKWebView for macOS does not allow configuration of tabsToLinks
Dan
Reported 2016-08-30 11:19:49 PDT
WebView allows setting [WebPreferences setTabsToLinks:] to allow the tab key to navigate between links in the web page. WKWebView does not expose this preference, which is an accessibility bug to us. To the end user interacting with the embedded browser, they are not aware they need to press options + tab to be able to access the link through keyboard. They expect the tab key which navigate between other cocoa controls in the window to navigate to the DOM elements that accept keyboard focus. Safari allows setTabsToLinks as a configurable setting, but the WKWebView control provided does not share this setting with Safari and no way to configure it through our code creating a WKWebView instance.
Attachments
Patch (3.97 KB, patch)
2016-08-30 18:40 PDT, Dan Saunders
no flags
Patch (4.12 KB, patch)
2016-09-10 15:16 PDT, Dan Saunders
no flags
Patch (4.04 KB, patch)
2016-09-12 14:20 PDT, Dan Saunders
no flags
Radar WebKit Bug Importer
Comment 1 2016-08-30 11:20:25 PDT
Dan Saunders
Comment 2 2016-08-30 18:40:12 PDT
Anders Carlsson
Comment 3 2016-08-31 10:01:34 PDT
Comment on attachment 287469 [details] Patch We have to figure out whether this is something we want to expose on WKPreferences or not - it could either be a WKWebViewConfiguration property or a WKWebView property.
Dan Saunders
Comment 4 2016-09-06 11:21:41 PDT
I think this is more of a preference than a WKWebView property. The same property is available in WebPreferences for WebView control, so it makes sense to me to add in WKPreferences. Most of the properties on WKWebView change their state based on the web page contents loaded in the control, which is not the case with tabsToLinks. There is not a WKWebViewConfiguration equivalent of WebView to base the location on (some properties on WebPreferences for WebView have moved to WKWebViewConfiguration), but you also find this option as a preference in Safari. The user may want to configure it based on the WKWebView application.
Anders Carlsson
Comment 5 2016-09-06 11:40:37 PDT
(In reply to comment #4) > I think this is more of a preference than a WKWebView property. The same > property is available in WebPreferences for WebView control, so it makes > sense to me to add in WKPreferences. Most of the properties on WKWebView > change their state based on the web page contents loaded in the control, > which is not the case with tabsToLinks. There is not a > WKWebViewConfiguration equivalent of WebView to base the location on (some > properties on WebPreferences for WebView have moved to > WKWebViewConfiguration), but you also find this option as a preference in > Safari. The user may want to configure it based on the WKWebView application. After talking to some of my fellow colleagues, I tend to agree - WKPreferences is intended to be used for "things you might want to show in a preferences window", and "tabs to links" is one of the Safari preferences. That said, I think we can come up with a better name than "tabsToLinks". It sounds like it converts tabs into links.
Dan Saunders
Comment 6 2016-09-06 11:55:48 PDT
(In reply to comment #5) > (In reply to comment #4) > > I think this is more of a preference than a WKWebView property. The same > > property is available in WebPreferences for WebView control, so it makes > > sense to me to add in WKPreferences. Most of the properties on WKWebView > > change their state based on the web page contents loaded in the control, > > which is not the case with tabsToLinks. There is not a > > WKWebViewConfiguration equivalent of WebView to base the location on (some > > properties on WebPreferences for WebView have moved to > > WKWebViewConfiguration), but you also find this option as a preference in > > Safari. The user may want to configure it based on the WKWebView application. > > After talking to some of my fellow colleagues, I tend to agree - > WKPreferences is intended to be used for "things you might want to show in a > preferences window", and "tabs to links" is one of the Safari preferences. > > That said, I think we can come up with a better name than "tabsToLinks". It > sounds like it converts tabs into links. I was keeping consistency with what is exposed in WebPreferences. Have there been other name changes between WebView and WKWebView for similar properties? I could call it tabNavigatesToLinks or linkTabStopEnabled
Blaze Burg
Comment 7 2016-09-09 17:05:36 PDT
(In reply to comment #6) > (In reply to comment #5) > > (In reply to comment #4) > > > I think this is more of a preference than a WKWebView property. The same > > > property is available in WebPreferences for WebView control, so it makes > > > sense to me to add in WKPreferences. Most of the properties on WKWebView > > > change their state based on the web page contents loaded in the control, > > > which is not the case with tabsToLinks. There is not a > > > WKWebViewConfiguration equivalent of WebView to base the location on (some > > > properties on WebPreferences for WebView have moved to > > > WKWebViewConfiguration), but you also find this option as a preference in > > > Safari. The user may want to configure it based on the WKWebView application. > > > > After talking to some of my fellow colleagues, I tend to agree - > > WKPreferences is intended to be used for "things you might want to show in a > > preferences window", and "tabs to links" is one of the Safari preferences. > > > > That said, I think we can come up with a better name than "tabsToLinks". It > > sounds like it converts tabs into links. > > > I was keeping consistency with what is exposed in WebPreferences. Have there > been other name changes between WebView and WKWebView for similar > properties? I could call it tabNavigatesToLinks or linkTabStopEnabled tabNavigatesToLinks sounds better to me. Anders, is there anything else holding up review of this patch aside from the renaming?
Blaze Burg
Comment 8 2016-09-09 17:05:58 PDT
Comment on attachment 287469 [details] Patch Please rename tabsToLinks to tabNavigatesToLinks.
Dan Saunders
Comment 9 2016-09-10 15:16:38 PDT
Anders Carlsson
Comment 10 2016-09-12 11:47:55 PDT
Comment on attachment 288503 [details] Patch After discussing the name some more, we feel that "tabFocusesLinks" better explains what this preference does - navigates sounds like it will actually navigate to the webpage that the link points to. Everything else looks great though, so please rename the property and we'll get it landed.
Dan Saunders
Comment 11 2016-09-12 14:20:16 PDT
WebKit Commit Bot
Comment 12 2016-09-12 14:44:36 PDT
Comment on attachment 288610 [details] Patch Clearing flags on attachment: 288610 Committed r205825: <http://trac.webkit.org/changeset/205825>
WebKit Commit Bot
Comment 13 2016-09-12 14:44:42 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.