Skip to content

Feature Request: Focusing search results when directly navigating to rustdoc search #86882

Open
@insou22

Description

@insou22

When users type something like !rust Box into a search engine like DuckDuckGo, it will navigate you to the docs.rs std search like this: https://doc.rust-lang.org/std/?search=Box

The behavior I would like to see is that once I reach the search page, I can simply hit Enter to navigate to the first result: std::boxed::Box, or alternatively navigate between the different options just by immediately using the arrow keys -- i.e. not having to use the mouse. The current behavior is that I have to either click on the option I want with my mouse, or click into the search bar before I'm able to then use the arrow keys / Enter to get to my option.

Is it a possibility to make it so that when a search query page is directly navigated to, it can allow you to immediately interact with the search results via keyboard? Obviously we wouldn't want to steal input focus away from a user who is still typing their query in however, so that's an important distinction.

I'm also happy to have a go at implementing this feature myself, assuming this is something that people are happy to see integrated.

Cheers!

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-rustdoc-searchArea: Rustdoc's search featureC-feature-requestCategory: A feature request, i.e: not implemented / a PR.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions