Skip to content
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

Docs: Collapsible admonitions that start collapsed should be more accessible #1479

Open
trgeiger opened this issue Nov 18, 2024 · 3 comments
Labels
documentation Improvements or additions to documentation kind/documentation Categorizes issue or PR as related to documentation.

Comments

@trgeiger
Copy link
Contributor

For longer file examples or command outputs, we currently use several collapsible admonition blocks on our docs site. It's not immediately obvious that these are expandable without some textual indication.

To improve accessibility and the general UX of the docs, we should add some indication that these are expandable to the admonition titles, or perhaps consider having all collapsible blocks start expanded.

@trgeiger trgeiger changed the title Docs: Collapsible admonitions that start collapsed should have a label Docs: Collapsible admonitions that start collapsed should be more accessible Nov 18, 2024
@m1kola m1kola added documentation Improvements or additions to documentation kind/documentation Categorizes issue or PR as related to documentation. labels Nov 19, 2024
@m1kola
Copy link
Member

m1kola commented Nov 25, 2024

I'm not an accessibility expert at all, but I checked with VoiceOver and it announces when you reach an expandable block and suggests how to expand or collapse it. I'm not sure if overall screen reader accessibility of the docs website is good enough. To improve accesibility we will likely have to contribute to mkdocs-material.

But I agree - even visually these blocks are not very intuitive. I do not have objections to either make them expanded by default or convert them non-collapsible admonitions.

@trgeiger
Copy link
Contributor Author

Yeah I've been meaning to do a general once-over for general accessibility issues. I should probably make a main issue with subissues or something once I do that. This one example of the expandable admonitions just came up for me when I was doing some of the other docs stuff. Testing the screenreader is good, but I think this is also a more general UX issue since the admonitions aren't obviously expandable when they start closed.

@michaelryanpeter
Copy link
Contributor

https://squidfunk.github.io/mkdocs-material/reference/admonitions/?h=expand#collapsible-blocks

All it would take is adding a + symbol to the ??? markup for the blocks you want expanded by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation kind/documentation Categorizes issue or PR as related to documentation.
Projects
None yet
Development

No branches or pull requests

3 participants