Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit e026e18

Browse files
committed
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. Fixes rust-lang#82582
1 parent 0846043 commit e026e18

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)