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.
<rdar://problem/28078982>
Created attachment 287469 [details] Patch
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.
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.
(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.
(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
(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?
Comment on attachment 287469 [details] Patch Please rename tabsToLinks to tabNavigatesToLinks.
Created attachment 288503 [details] Patch
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.
Created attachment 288610 [details] Patch
Comment on attachment 288610 [details] Patch Clearing flags on attachment: 288610 Committed r205825: <http://trac.webkit.org/changeset/205825>
All reviewed patches have been landed. Closing bug.