-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix a few accessibility violations #2547
Conversation
henrif75
commented
Jan 14, 2025
- 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)
- Speaker's notes now at correct heading sequence - Add chrome.css and general.css to override default css file. This is necessary to fix links without underline violation (hyperlinks relying only on color)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was surprised to find that general.css and chrome.css are already referenced in index.hbs.
@@ -0,0 +1,279 @@ | |||
/* Base styles and content styles */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's strange that we've been missing it all along 😄
My understanding is that mdbook build
will pull in theme files from https://github.com/rust-lang/mdBook/tree/master/src/theme/css, unless the local theme has a file with the same name.
But perhaps I've misunderstood this all along?
@@ -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'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this change perhaps belong in https://github.com/rust-lang/mdBook/blob/master/src/theme/index.hbs?
Thanks so much for looking at this, Henri! |
FWIW, if any of the CSS files (e.g., |