about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2021-02-27 12:37:05 +0200
committerVincent Ambo <tazjin@google.com>2021-02-27 12:37:05 +0200
commite026e18e3fe7c19e7072cac86b9e9296d551ab5b (patch)
treea10f80946603336b7ea3a95fb8d1c4685c26230a
parent0846043440b480e4bbf36ac19db3948f0c835bb1 (diff)
downloadrust-e026e18e3fe7c19e7072cac86b9e9296d551ab5b.tar.gz
rust-e026e18e3fe7c19e7072cac86b9e9296d551ab5b.zip
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 #82582
-rw-r--r--src/librustdoc/html/layout.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustdoc/html/layout.rs b/src/librustdoc/html/layout.rs
index e5a686bd07d..73c106f5ae0 100644
--- a/src/librustdoc/html/layout.rs
+++ b/src/librustdoc/html/layout.rs
@@ -75,7 +75,7 @@ crate fn render<T: Print, S: Print>(
     <![endif]-->\
     {before_content}\
     <nav class=\"sidebar\">\
-        <div class=\"sidebar-menu\">&#9776;</div>\
+        <div class=\"sidebar-menu\" role=\"button\">&#9776;</div>\
         {logo}\
         {sidebar}\
     </nav>\