rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
97.1k stars 12.55k forks source link

rustdoc: Generated themes hide/make navigation links not-obvious #94089

Open vexx32 opened 2 years ago

vexx32 commented 2 years ago

Currently some of the navigation links in rustdoc are being colored the same color as surrounding text, which is super bad for actually being visually navigable. This is the only link I can find to navigate to the parent module from the docs page for the struct. It should not be this hard to notice.

Easiest example is basically any page on docs.rs, one example: https://doc.rust-lang.org/std/collections/struct.HashMap.html

image

This screenshot was taken with the Ayu theme, but the same problem is present in every available theme currently. Hovering collections here highlights it as a link with an underline, but that is very not-obvious at a glance (the underline is only present on hover), so it's not at all clear how to navigate from (for example) a struct to its parent module page, in many cases.

Any navigable link should be visually distinct from the surrounding text. Currently, these kinds of links are not. See also https://usability.yale.edu/web-accessibility/articles/links#designing-links

Arguably, all links should be reasonably similar so that users aren't conditioned to expect links to be one thing or a small subset of things, and then there are other links styled completely differently hidden in other areas of the page. Especially having a link that looks like plaintext right alongside a link that is visually obvious is misleading.

N.B.: Apologies for probably picking the wrong template; I couldn't find a template that seemed to be suited for the generated UI/theming or anything specific to Rustdoc.

compiler-errors commented 2 years ago

@rustbot label T-rustdoc A-rustdoc-themes A-rustdoc-ui