Page MenuHomePhabricator

Tab to search after article loaded no longer works
Closed, DeclinedPublic

Description

Steps to reproduce

  1. Open any article
  2. Press Tab

Expected behavior
Until today the focus moved right into the search field.

Current behavior
Since today there is no such easy way. You either have to press three-keys shortcut or click into the field or use Shift+Tab cca 20 times, which takes more time.

Configuration
Vector

Event Timeline

How can I return the functionality back? Why hasn't this been presented in the Tech News to the communities?

@Dvorapa You're still able to go directly to the search box with ctrl-option-f on macOS, alt-shift-f on Windows.

Yeah, but it is slow and inefficient

Volker_E edited projects, added Vector; removed Discovery-Search.

The tabbing was order was confusing and unexpected to some users as shared in the task description of T226148, an additional JS module was loaded for every user.

Now the tabbing is weird too. First it goes through the article, then it jumps to the top bar, then it jumps to the left menu, then under the article and after that back to the article? This is really unexpected behavior, I would understand Shift+Tab would go to the search field, but Shift + Tab goes under the article, which is really weird

It seems to me this change has not been thought-out much

The DOM structure of Vector has always been problematic in that sense, moving search bar out of it by adding tabindex=1 doesn't resolve that issue, it's just confusing users (and specifically users of assistive technology) additionally . I've already mentioned in the other task T31199. T48336 is also related showing how the tabindex of search was negatively impacting keyboard user expectations.

In any case, you could still add
$( '#searchInput' ).attr( 'tabindex', $( document ).lastTabIndex() + 1 ); to your common.js
if you're completely bought in the way it was done before.

I solved it for me and our community by creating a gadget, but anyway, still I think the tab order should be rethought.

Would you wanna link it here, in case other users search for the same issue?

Yeah, I've chosen a better approach of not changing tabindex, just moving focus to the preceding element in order to not break future changes of the order, but still after search it jumps to the left menu, which is super-weird to me

if ( !mw.config.get( 'wgIsMainPage' ) ) {
  $( function () {
    $( '#p-cactions input' ).focus();
  } );
}

You are aware that above approach takes focus from any autofocussed element on the page, like on AdvancedSearch for example, breaking the most important user flow there?

I've never experienced any other focus than to the searchField, is this AdvancedSearch focus even working?

@Dvorapa If it's not, it might be a bug. ;)