Skip to content

Commit 97fd561

Browse files
authored
Rollup merge of #82584 - tazjin:rustdoc-aria, r=GuillaumeGomez
Add ARIA role to sidebar toggle in Rustdoc This indicates that the div is an interactive element, and makes the sidebar toggle "clickable" in assistive technologies. Example of Vimium after this change has been applied (see the issue mentioned below for a screenshot of before): ![Screenshot of Vimium link hints on a Rustdoc page, indicating that the sidebar toggle is clickable](https://user-images.githubusercontent.com/1552853/109384961-ff935400-78f8-11eb-8199-1d35181aeff0.png) Fixes #82582
2 parents d14b18e + e026e18 commit 97fd561

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustdoc/html/layout.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ crate fn render<T: Print, S: Print>(
7575
<![endif]-->\
7676
{before_content}\
7777
<nav class=\"sidebar\">\
78-
<div class=\"sidebar-menu\">&#9776;</div>\
78+
<div class=\"sidebar-menu\" role=\"button\">&#9776;</div>\
7979
{logo}\
8080
{sidebar}\
8181
</nav>\

0 commit comments

Comments
 (0)