]> git.lizzy.rs Git - rust.git/commitdiff
rustdoc: add tooltips to some buttons
authorLiigo Zhuang <liigo@qq.com>
Thu, 20 May 2021 06:54:28 +0000 (14:54 +0800)
committerLiigo Zhuang <liigo@qq.com>
Thu, 20 May 2021 06:54:28 +0000 (14:54 +0800)
src/librustdoc/html/layout.rs
src/librustdoc/html/render/print_item.rs

index ec04c94dc11f9131c2b8c45dcb1dc9bfe3a97059..5d6056b0546bb35dd543d20ebe28d56aa753a1f0 100644 (file)
@@ -87,7 +87,7 @@ impl<'a> Page<'a> {
         {sidebar}\
     </nav>\
     <div class=\"theme-picker\">\
-        <button id=\"theme-picker\" aria-label=\"Pick another theme!\" aria-haspopup=\"menu\">\
+        <button id=\"theme-picker\" aria-label=\"Pick another theme!\" aria-haspopup=\"menu\" title=\"themes\">\
             <img src=\"{static_root_path}brush{suffix}.svg\" \
                  width=\"18\" height=\"18\" \
                  alt=\"Pick another theme!\">\
@@ -105,8 +105,8 @@ impl<'a> Page<'a> {
                            placeholder=\"Click or press ‘S’ to search, ‘?’ for more options…\" \
                            type=\"search\">\
                 </div>\
-                <button type=\"button\" id=\"help-button\">?</button>
-                <a id=\"settings-menu\" href=\"{root_path}settings.html\">\
+                <button type=\"button\" id=\"help-button\" title=\"help\">?</button>
+                <a id=\"settings-menu\" href=\"{root_path}settings.html\" title=\"settings\">\
                     <img src=\"{static_root_path}wheel{suffix}.svg\" \
                          width=\"18\" height=\"18\" \
                          alt=\"Change settings\">\
index bac9c21f0f39b20eb3ab183ecd013f4a796d2779..5799f5859cef70fbe3bff1987328fd2a6e5eb10c 100644 (file)
@@ -78,7 +78,7 @@ pub(super) fn print_item(cx: &Context<'_>, item: &clean::Item, buf: &mut Buffer,
     write!(buf, "<a class=\"{}\" href=\"\">{}</a>", item.type_(), item.name.as_ref().unwrap());
     write!(
         buf,
-        "<button id=\"copy-path\" onclick=\"copy_path(this)\">\
+        "<button id=\"copy-path\" onclick=\"copy_path(this)\" title=\"copy path\">\
             <img src=\"{static_root_path}clipboard{suffix}.svg\" \
                 width=\"19\" height=\"18\" \
                 alt=\"Copy item import\">\