Page MenuHomePhabricator

give search box (id="searchInput") focus by default on Main_Page
Closed, ResolvedPublic

Description

Author: awuest

Description:
It is extremely cumbersome to first click into the search box before being able
to enter text on the main page. Of course there's always Alt+f, but these are
two buttons too many, at least on the main page. If the search box should have
focus on non-main pages can be discussed, since it may be nice to give focus to
the first link of the content, for accessibility reasons.

I would propose to to add

tabindex="1"

to

<input id="searchInput" name="search" type="text" accesskey="f" value="" />

which will give focus to the search box after one tab hit (don't use '0' for the
tabindex, since other elements would get focus first then). For those who have
ECMAScript enabled, add an attribute

onLoad="setFocus()"

to the <body> element, and specify a function

function setFocus() {
  document.search.focus();
}

which gives focus to the search box on page-load.


Version: 1.4.x
Severity: normal
OS: Linux
Platform: PC

Details

Reference
bz2010

Revisions and Commits

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 8:27 PM
bzimport set Reference to bz2010.
bzimport added a subscriber: Unknown Object (MLST).

avarab wrote:

Aside from the tabindex and the Main Page suggestion this is a dupe of bug 1864,
please add your comments to that bug.

*** This bug has been marked as a duplicate of 1864 ***

epriestley added a commit: Unknown Object (Diffusion Commit).Mar 4 2015, 8:24 AM
epriestley added a commit: Unknown Object (Diffusion Commit).
epriestley added a commit: Unknown Object (Diffusion Commit).