Skip to content

Commit b50a2ff

Browse files
committed
Rollup merge of #33194 - mitaa:rdoc-a, r=alexcrichton
rustdoc: Improve accessibility of rustdoc pages fixes #33131 r? @alexcrichton
2 parents 4c0fdeb + bb9ec82 commit b50a2ff

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/librustdoc/html/render.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2557,10 +2557,11 @@ fn render_impl(w: &mut fmt::Formatter, cx: &Context, i: &Impl, link: AssocItemLi
25572557
if !is_static || render_static {
25582558
let id = derive_id(format!("{}.{}", shortty, name));
25592559
write!(w, "<h4 id='{}' class='{}'>", id, shortty)?;
2560-
render_stability_since_raw(w, item.stable_since(), outer_version)?;
25612560
write!(w, "<code>")?;
25622561
render_assoc_item(w, item, link.anchor(&id))?;
2563-
write!(w, "</code></h4>\n")?;
2562+
write!(w, "</code>")?;
2563+
render_stability_since_raw(w, item.stable_since(), outer_version)?;
2564+
write!(w, "</h4>\n")?;
25642565
}
25652566
}
25662567
clean::TypedefItem(ref tydef, _) => {

src/librustdoc/html/static/main.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -981,7 +981,7 @@
981981
$(".method").each(function() {
982982
if ($(this).next().is(".docblock") ||
983983
($(this).next().is(".stability") && $(this).next().next().is(".docblock"))) {
984-
$(this).children().first().after(toggle.clone());
984+
$(this).children().last().after(toggle.clone());
985985
}
986986
});
987987

0 commit comments

Comments
 (0)