LP1796225: Only auto-focus search on the home page user/sandbergja/lp1796225_dont_autofocus_searchbar_on_non-search_pages
authorJane Sandberg <sandbej@linnbenton.edu>
Sat, 6 Oct 2018 12:52:09 +0000 (05:52 -0700)
committerJane Sandberg <sandbej@linnbenton.edu>
Sat, 6 Oct 2018 12:52:09 +0000 (05:52 -0700)
commit146593b87d7f91160dfe7f679eba12b2a195dcd0
treebb3352300b1fa9b2ba913e31e4069b41b46163dd
parent4c0ab5a70829a29da1b70a5ea680a99b8f13d0a7
LP1796225: Only auto-focus search on the home page

For a11y and usability, it's better to autofocus form fields
only when they are the main purpose of a page.

To test:
1) In the public catalog, visit the search results, record view,
library details, basket, and password reset pages.  Notice that
the cursor leaps to the search bar in each of these pages.
2) Apply this commit.
3) Re-visit all those pages.  Notice that the cursor no longer
leaps to the search bar.
4) Visit the home page of the public catalog.  Notice that the
cursor still leaps to the search bar on this page only.

Signed-off-by: Jane Sandberg <sandbej@linnbenton.edu>
Open-ILS/src/templates/opac/parts/searchbar.tt2