1
0
mirror of https://github.com/google/comprehensive-rust.git synced 2025-07-17 03:22:22 +02:00

Fix a few accessibility violations (#2547)

* Add chrome.css and general.css to override default css file. This is
necessary to fix links without underline (hyperlinks relying only on
color).
* Fix pop-out button without id and wrong ARIA-ROLE
* Speaker's notes now at correct heading sequence (H3)
This commit is contained in:
Henri F.
2025-01-15 19:11:19 -08:00
committed by GitHub
parent aa548f4431
commit f95c28f9a7
5 changed files with 970 additions and 8 deletions

View File

@ -289,7 +289,6 @@
<!-- Apply ARIA attributes after the sidebar and the sidebar toggle button are added to the DOM -->
<script>
document.getElementById('sidebar-toggle').setAttribute('aria-expanded', sidebar === 'visible');
document.getElementById('sidebar').setAttribute('aria-hidden', sidebar !== 'visible');
Array.from(document.querySelectorAll('#sidebar a')).forEach(function(link) {
link.setAttribute('tabIndex', sidebar === 'visible' ? 0 : -1);