WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
REOPENED
199671
Change of default behavior of tab to focus on form elements
https://bugs.webkit.org/show_bug.cgi?id=199671
Summary
Change of default behavior of tab to focus on form elements
Pier Bover
Reported
2019-07-10 09:21:27 PDT
By default Webkit does not focus on checkboxes/radio/buttons when pressing tab unless a user setting is enabled. This means that by default the tabindex attribute is ignored on certain elements. This seems to go against the typical behavior of sequential focus navigation. It seems strange that only these specific elements are ignored. For example, it is possible to specify tabindex on a div and pressing tab will focus on it. Is there really more value in being able to focus on a div than a checkbox? While I understand this unique behavior is historical in Safari, and that it is possible to use alt+tab to focus on any element, shouldn't there be a way for developers to allow focusing on any element when using the universal default keyboard navigation shortcut (tab)? For example, the default behavior could be kept intact unless tabindex was specified in the checkbox.
Attachments
Add attachment
proposed patch, testcase, etc.
Tim Horton
Comment 1
2019-07-10 13:54:26 PDT
I think you want the somewhat-questionably-named "tabFocusesLinks" bit in WKPreferences, which will make links and form controls focusable.
Pier Bover
Comment 2
2019-07-10 13:55:54 PDT
That works for WKWebView but not for regular websites.
Tim Horton
Comment 3
2019-07-10 13:57:46 PDT
(In reply to Pier Bover from
comment #2
)
> That works for WKWebView but not for regular websites.
For websites, it's up to the user (Preferences->Advanced->"Press Tab to highlight each item on a webpage")
Tim Horton
Comment 4
2019-07-10 13:58:12 PDT
If this request is to change the default in Safari, that should be filed at bugreport.apple.com, not here.
Pier Bover
Comment 5
2019-07-10 14:01:30 PDT
Tim, did you read my first comment?
Pier Bover
Comment 6
2019-07-10 14:02:44 PDT
Also, I posted here after Brady Eidson suggested it to me.
Tim Horton
Comment 7
2019-07-10 14:03:02 PDT
I did, but I don't understand your actual request. Is it for *web-facing* API to switch the default for a particular page?
Tim Horton
Comment 8
2019-07-10 14:03:45 PDT
("developers" is an overloaded term on this forum :D)
Tim Horton
Comment 9
2019-07-10 14:06:14 PDT
Ah, I see, the last sentence is important.
Alexey Proskuryakov
Comment 10
2019-07-10 14:11:19 PDT
Seems like the request is to make form controls focusable when they have tabindex. Is that correct? I'm super suspicious of letting webpages be inconsistent in this regard, that seems like inconsistency would result in poor user experience. On the other hand, I never noticed a problem with divs - not sure if that's because very few pages regrettably modify the behavior for those, or because it's actually an OK thing to do.
Pier Bover
Comment 11
2019-07-10 18:41:20 PDT
(In reply to Alexey Proskuryakov from
comment #10
)
> Seems like the request is to make form controls focusable when they have > tabindex. Is that correct?
Yes, that's the idea.
> I'm super suspicious of letting webpages be inconsistent in this regard, > that seems like inconsistency would result in poor user experience.
On the other hand Safari not focusing on all form elements is the exception compared to other browsers.
Marius S
Comment 12
2023-06-28 07:02:50 PDT
The option "Press Tab to highlight each item on a webpage" should be enabled by default. I think this is important from an accessibility point of view. "... A keyboard user typically uses the Tab key to navigate through interactive elements on a web page—links, buttons, fields for inputting text, etc..." See
https://webaim.org/techniques/keyboard/
for details.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug