Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some buttons on the rustdoc search results page aren't properly marked up #79859

Closed
sersorrel opened this issue Dec 9, 2020 · 4 comments · Fixed by #79896
Closed

some buttons on the rustdoc search results page aren't properly marked up #79859

sersorrel opened this issue Dec 9, 2020 · 4 comments · Fixed by #79896
Assignees
Labels
A-rustdoc-ui Area: rustdoc UI (generated HTML) C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@sersorrel
Copy link

on the rustdoc search results page, it's not possible to focus the tabs with tab or activate them with vimium:

image

in addition, the "help" button beside the search field is just a plain <span>, so you can't focus it with tab. (the "settings" button is an <a>, so that one is focusable.)

see also #65212

@sersorrel sersorrel added the C-bug Category: This is a bug. label Dec 9, 2020
@jyn514
Copy link
Member

jyn514 commented Dec 9, 2020

cc #65212 you had this in the issue and I didn't read 😆

@jyn514 jyn514 added A-rustdoc-ui Area: rustdoc UI (generated HTML) T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Dec 9, 2020
@GuillaumeGomez
Copy link
Member

So replacing that with <a> would fix them? Well, I'll make the PR tomorrow then!

@GuillaumeGomez GuillaumeGomez self-assigned this Dec 9, 2020
@sersorrel
Copy link
Author

i think so, though you'd also need to specify a href to get them to be tab-focusable, i think (imo <button> might be more semantically correct, though i'm no expert; that also comes with more potential styling issues). there are also a couple of css rules specific to the settings button that maybe should also apply to the help button (particularly the outline: none).

@GuillaumeGomez
Copy link
Member

I'll find a way, don't worry. ;)

Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Dec 10, 2020
… r=Manishearth

Make search results tab and help button focusable with keyboard

Fixes rust-lang#79859.

I replaced the element with `button` tag, which allows to focus them (and "click" on them using "enter") using only the keyboard.

cc `@sersorrel`

r? `@Manishearth`
@bors bors closed this as completed in 3a46a6b Dec 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rustdoc-ui Area: rustdoc UI (generated HTML) C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants