Rollup merge of #33194 - mitaa:rdoc-a, r=alexcrichton
rustdoc: Improve accessibility of rustdoc pages fixes #33131 r? @alexcrichton
This commit is contained in:
commit
b50a2ff4d1
2 changed files with 4 additions and 3 deletions
|
@ -2557,10 +2557,11 @@ fn render_impl(w: &mut fmt::Formatter, cx: &Context, i: &Impl, link: AssocItemLi
|
||||||
if !is_static || render_static {
|
if !is_static || render_static {
|
||||||
let id = derive_id(format!("{}.{}", shortty, name));
|
let id = derive_id(format!("{}.{}", shortty, name));
|
||||||
write!(w, "<h4 id='{}' class='{}'>", id, shortty)?;
|
write!(w, "<h4 id='{}' class='{}'>", id, shortty)?;
|
||||||
render_stability_since_raw(w, item.stable_since(), outer_version)?;
|
|
||||||
write!(w, "<code>")?;
|
write!(w, "<code>")?;
|
||||||
render_assoc_item(w, item, link.anchor(&id))?;
|
render_assoc_item(w, item, link.anchor(&id))?;
|
||||||
write!(w, "</code></h4>\n")?;
|
write!(w, "</code>")?;
|
||||||
|
render_stability_since_raw(w, item.stable_since(), outer_version)?;
|
||||||
|
write!(w, "</h4>\n")?;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
clean::TypedefItem(ref tydef, _) => {
|
clean::TypedefItem(ref tydef, _) => {
|
||||||
|
|
|
@ -981,7 +981,7 @@
|
||||||
$(".method").each(function() {
|
$(".method").each(function() {
|
||||||
if ($(this).next().is(".docblock") ||
|
if ($(this).next().is(".docblock") ||
|
||||||
($(this).next().is(".stability") && $(this).next().next().is(".docblock"))) {
|
($(this).next().is(".stability") && $(this).next().next().is(".docblock"))) {
|
||||||
$(this).children().first().after(toggle.clone());
|
$(this).children().last().after(toggle.clone());
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue