Bug 213582

Summary: AX: elements with tabindex="-1" still appear in tab order in some circumstances
Product: WebKit Reporter: James Craig <jcraig>
Component: AccessibilityAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: cromas, daniel.dafoe, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
Attachments:
Description Flags
reduced test case none

Description James Craig 2020-06-24 17:21:16 PDT
Created attachment 402699 [details]
reduced test case

Load attached test case and follow the instructions. This is a developer-reported bug noticed on a production site. They are trying to pull one item out of the focus loop and it works in all browsers except Safari.
Comment 1 Radar WebKit Bug Importer 2020-06-24 17:21:26 PDT
<rdar://problem/64729871>
Comment 2 James Craig 2020-06-24 17:24:51 PDT
I forgot to mention that the behavior works as expected if you leave Safari and System FKA defaults to off. However, the test case is broken if you enable either of the following:

- SysPrefs > Keyboard > Shortcuts > Use keyboard navigation...
- Safari Prefs > Advanced > Press Tab to highlight...

In any case, elements with tabindex="-1" should not appear in the tab loop.
Comment 3 Craig Kovatch 2020-06-24 20:45:25 PDT
Thanks for cutting this bug, James :)

Just wanted to add some notes from my initial testing, where "buttons" is <button> elements, checkboxes is <input type="checkbox">, and links are <a href>

1. System FKA ON, Safari FKA ON, JS OFF
  - Tabbing skips the grid entirely
  - From a focused cell, tab visits buttons and checkboxes, and links
2. System FKA OFF, Safari FKA ON, JS OFF
  - Tabbing skips the grid entirely
  - From a focused cell, tab visits buttons and checkboxes, and links
3. System FKA ON, Safari FKA OFF, JS OFF
  - Tabbing skips the grid entirely
  - From a focused cell, tab visits buttons and checkboxes, not the links
4. System FKA OFF, Safari FKA OFF, JS OFF
  - Tabbing skips the grid entirely
  - From a focused cell, tab visits nothing
Comment 4 Daniel Dafoe 2023-07-17 14:36:58 PDT
Bumping this up since this can be reproduced on any product page on the Apple.com store that uses the Buy Flow Evolution design (e.g., iPhone). Each heading has tabindex="-1", so each are focused when tabbing through with FKA enabled.

I haven't seen it mentioned yet for iOS, but this was raised for FKA on iOS in Safari. I am also able to reproduce in iOS 17 beta 3 Safari.