Page MenuHomePhabricator

Deleting pages - wrong tabindex (OOUI JS DropdownInputWidget does not support tabIndex)
Closed, ResolvedPublic

Description

Email from patroller:

"I just noticed another bad thing when doing the patrol work at Czech Wikipedia. I usually control Wikipedia (including delete iface) by my keyboard. When I press Shift+Tab in delete form, my cursor is moved to the address bar instead of moving to Reason input bar when I can select correct deletion reason using my loved keyboard.

Now, I must a) move my mouse to click at the Reason selectbox, but even more, finding the correct deletion reason using my eyes (instead of pressing its first letter and letting the software find it instead of me). "

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

I think this is a bug with OOUI's DropdownInputWidget (or FieldLayout maybe). cc @Volker_E

Well this sure does look fishy. A non-visible but interactive control, and a visible 'non-control'/div which has been made interactive by using tabindex=0

Screen Shot 2018-03-21 at 09.55.17.png (264×1 px, 134 KB)

That can't be accessible I think...

And the summary field has tabindex=2, which explains why it has initial focus (possibly intentional)

Screen Shot 2018-03-21 at 09.57.34.png (208×546 px, 48 KB)

Thanks, @TheDJtabindex=2 might have sounded like a good idea, but is unintuitive from a normal keyboard user perspective. Will dive further into if there has been more explanation given to put it on "2" by default. Incremental tabindex is set on all elements, just DropdownInputWidget doesn't pass it through on the handle.
This needs to be fixed.

@Volker_E I think incremental tabindex is something we used to do and have since deprecated. It's probably just that it wasn't removed from all components after it was deprecated, and then when this was reworked, it broke ?

Well this sure does look fishy. A non-visible but interactive control, and a visible 'non-control'/div which has been made interactive by using tabindex=0

Screen Shot 2018-03-21 at 09.55.17.png (264×1 px, 134 KB)

That can't be accessible I think...

It is harmless. The <select> element is hidden with display: none, so it is not interactive. We keep it there instead of <input type=hidden> to allow the browser to remember/restore the selection in case of back/forward navigation.

@Volker_E I think incremental tabindex is something we used to do and have since deprecated. It's probably just that it wasn't removed from all components after it was deprecated, and then when this was reworked, it broke ?

We use that in some forms (e.g. the deletion form, also the edit form), I don't think we've ever "deprecated" it. I don't know why it was done, perhaps it improved the behavior in some browsers popular in 2005 when this code was written. However, I would be wary of removing it, as various site scripts might rely on it. (E.g. inserting additional elements into the form that users don't expect to be tabbable, like buttons to insert canned edit summaries.) Let's not touch this if it's not broken.

Incremental tabindex is set on all elements, just DropdownInputWidget doesn't pass it through on the handle.
This needs to be fixed.

This is the real issue here, I think. JS DropdownInputWidget apparently doesn't support 'tabIndex' (PHP works fine).

matmarex renamed this task from Deleting pages - wrong tabindex to Deleting pages - wrong tabindex (OOUI JS DropdownInputWidget does not support tabIndex).Apr 4 2018, 10:31 PM
matmarex claimed this task.

Change 424156 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[oojs/ui@master] DropdownInput-/RadioSelectInputWidget: Fix support for 'tabIndex'

https://gerrit.wikimedia.org/r/424156

Change 424156 merged by jenkins-bot:
[oojs/ui@master] DropdownInput-/RadioSelectInputWidget: Fix support for 'tabIndex'

https://gerrit.wikimedia.org/r/424156

Volker_E closed this task as Resolved.
Volker_E triaged this task as High priority.
Volker_E triaged this task as High priority.
Volker_E moved this task from Reviewing to OOUI-0.26.3 on the OOUI board.
Volker_E edited projects, added OOUI (OOUI-0.26.3); removed OOUI.
Volker_E removed a project: Patch-For-Review.