Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 917e6fd

Browse files
authoredJun 5, 2021
Rollup merge of rust-lang#85503 - liigo:tooltips, r=GuillaumeGomez
rustdoc: add tooltips to some buttons
2 parents 2dd7184 + 375ca93 commit 917e6fd

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed
 

‎src/librustdoc/html/layout.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ crate fn render<T: Print, S: Print>(
8787
{sidebar}\
8888
</nav>\
8989
<div class=\"theme-picker\">\
90-
<button id=\"theme-picker\" aria-label=\"Pick another theme!\" aria-haspopup=\"menu\">\
90+
<button id=\"theme-picker\" aria-label=\"Pick another theme!\" aria-haspopup=\"menu\" title=\"themes\">\
9191
<img src=\"{static_root_path}brush{suffix}.svg\" \
9292
width=\"18\" height=\"18\" \
9393
alt=\"Pick another theme!\">\
@@ -105,8 +105,8 @@ crate fn render<T: Print, S: Print>(
105105
placeholder=\"Click or press ‘S’ to search, ‘?’ for more options…\" \
106106
type=\"search\">\
107107
</div>\
108-
<button type=\"button\" id=\"help-button\">?</button>
109-
<a id=\"settings-menu\" href=\"{root_path}settings.html\">\
108+
<button type=\"button\" id=\"help-button\" title=\"help\">?</button>
109+
<a id=\"settings-menu\" href=\"{root_path}settings.html\" title=\"settings\">\
110110
<img src=\"{static_root_path}wheel{suffix}.svg\" \
111111
width=\"18\" height=\"18\" \
112112
alt=\"Change settings\">\

‎src/librustdoc/html/render/print_item.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ pub(super) fn print_item(cx: &Context<'_>, item: &clean::Item, buf: &mut Buffer,
7878
write!(buf, "<a class=\"{}\" href=\"#\">{}</a>", item.type_(), item.name.as_ref().unwrap());
7979
write!(
8080
buf,
81-
"<button id=\"copy-path\" onclick=\"copy_path(this)\">\
81+
"<button id=\"copy-path\" onclick=\"copy_path(this)\" title=\"copy path\">\
8282
<img src=\"{static_root_path}clipboard{suffix}.svg\" \
8383
width=\"19\" height=\"18\" \
8484
alt=\"Copy item import\" \

0 commit comments

Comments
 (0)
Please sign in to comment.