Skip to content

Commit

Permalink
Improve accessibility of rustdoc pages
Browse files Browse the repository at this point in the history
  • Loading branch information
mitaa committed Apr 25, 2016
1 parent 645dd01 commit bb9ec82
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/librustdoc/html/render.rs
Expand Up @@ -2548,10 +2548,11 @@ fn render_impl(w: &mut fmt::Formatter, cx: &Context, i: &Impl, link: AssocItemLi
if !is_static || render_static {
let id = derive_id(format!("{}.{}", shortty, name));
write!(w, "<h4 id='{}' class='{}'>", id, shortty)?;
render_stability_since_raw(w, item.stable_since(), outer_version)?;
write!(w, "<code>")?;
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, _) => {
Expand Down
2 changes: 1 addition & 1 deletion src/librustdoc/html/static/main.js
Expand Up @@ -981,7 +981,7 @@
$(".method").each(function() {
if ($(this).next().is(".docblock") ||
($(this).next().is(".stability") && $(this).next().next().is(".docblock"))) {
$(this).children().first().after(toggle.clone());
$(this).children().last().after(toggle.clone());
}
});

Expand Down

0 comments on commit bb9ec82

Please sign in to comment.