ndmitchell / ndmitchell/hoogle
Autofocus search bar?
Nobody has claimed this yet.
- Dominant language
- Haskell
- Stars
- 803
- Forks
- 152
- PR merge metrics
- No merged PRs in 30d
Description
I tend to use the keyboard and avoid the mouse as much as possible. For this workstyle it would be helpful if the search box was autofocused (as it is on Hackage). I don't see any downsides for other users, since pretty much every use of hoogle requires filling this field in (but please correct me if I'm wrong!).
A similar idea is to improve the link hinting that Vimium does (follow links/focus text boxes via the keyboard) by adding a label to the search box. However I have no idea how this interacts with other browser extensions or users.
My HTML knowledge is pretty slim, but I think these could be accomplished by:
- adding an
autofocusattribute to the "Search for..." input element - adding a
<label for="hoogle">Query</label>immediately before the input element. This label could also be made hidden, to not change the rendered page.
I haven't tested the first or made a merge request with the changes as I don't understand how to locally deploy a modified version of hoogle. An example of making the second change to the live page (using Firefox's developer tools) is:
before: to select the search box one can type "19"

after: now one can also type "qu" (or "2")

Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Locate the Hoogle page template containing the “Search for...” input and determine how to deploy a modified version locally. Verify that keyboard users can reach the search box immediately and through link hinting, and that the finished page provides the requested autofocus and accessible label without disrupting other users.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell, html
- Domain
- accessibility, frontend
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100