Skip to content

Rustdoc search box fails accessability guidelines #31060

Open
@steveklabnik

Description

@steveklabnik

Background links: https://www.w3.org/TR/WCAG20-TECHS/H32.html for a11y, http://doc.rust-lang.org/std/ for rustdoc search. Before typing anything:

2016-01-20-141055_981x72_scrot

After typing a query:

2016-01-20-141108_968x198_scrot

Basically, we currently implement the searchbox by using JS to hook into the submission: https://github.com/rust-lang/rust/blob/master/src/librustdoc/html/static/main.js#L737-L741

So we're not providing a 'submit' button. But we're supposed to.

I'm not sure of the best way to resolve this, exactly. I think the plan would be:

  1. create an <input type="submit">
  2. hide it with CSS
  3. have it trigger that JS instead

Does that make sense? I am bad at front-end :(

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-a11yArea: Anything to do with accessibilityC-bugCategory: This is a bug.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