-
-
Notifications
You must be signed in to change notification settings - Fork 564
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
Accessibility audit with several findings (serious and best practise) #2693
Comments
Thank you @markteekman! Appreciate you taking the time to share these. Would you mind also sharing some resources around how you determined what is serious, what is a best practice, etc.? There are some of these where I don’t necessarily agree with the analysis/recommendation, so I’m curious to learn more about the reasoning behind them. For example, are there specific WCAG success criteria that you feel are not met? If so, which ones? That kind of thing would be super helpful. |
Quick responses to the “serious” items:
Definitely. Should be fixed by #2708.
This recommendation usually applies to the page’s main content. Use of heading levels that don’t start at h1 (such as the h2 you highlighted) is allowable outside of the primary content.
These buttons have a clear visual indication from their context and the background colour on the “Get started” link. Hover/focus styles would be nice but not an accessibility fix as they don’t help users who can’t hover/focus.
That link doesn’t open in a new tab.
Agreed. This will need fixing upstream in Expressive Code. I’ll try to find time to make a PR there — the fix shouldn’t be too hard I don’t think.
I’d definitely love to improve things here. On top of the items you highlighted, basic QoL keyboard navigation is also not that great. The current implementation is the default UI provided by the Pagefind library. In all likelihood, we need to build our own UI entirely from scratch to get everything we need. It’s something @HiDeoo and I have discussed and want to get to eventually, but obviously it’s also a pretty major undertaking.
This is a known issue, reported in #316. |
Hey Chris, my apologies, I should have provided more context to why I marked something as serious vs best practice. To be honest, I tend to mark more findings as serious which is purely subjective because I believe in building the most accessible experience possible, not just meeting minimum requirements. While complying with WCAG success criteria is important, we can often improve the UX for people with disabilities even further by implementing additional best practices. With that said, let me distill this list further, as most items should actually be categorized as best practices 🙂 Also, I removed the point about headings. I learned something new here - I didn't realize heading hierarchy was specific to landmarks! I was misled by an outdated tool I use (HeadingsMap) that flags these as errors. So thanks for that 😄 Anyway, here's a more accurate list of the findings:
♿ Best Practices
|
Thanks for the extra links — that is super helpful! Will make some time to look at these in more detail. |
What version of
starlight
are you using?Latest
What version of
astro
are you using?Latest
What package manager are you using?
pnpm
What operating system are you using?
Mac
What browser are you using?
Chrome and Firefox
Describe the Bug
Accessibility audit
As promised a while ago here: #1950 (comment) I spent a couple of hours to do a thorough audit of the Astro Starlight theme accessibility wise. The theme is really solid already, so this list consist mainly of findings to further improve the accessibility:
h2
before theh1
on the page ("On this page" in the sidebar)aria-live
region for this.aria-live
region.role="combobox"
for a better screen reader experience and provide arrow key up/down interaction on the results list for an improved keyboard experience. Example setup I made for another project:♿ Best practices
button
instead ofa
for tab buttons.aria-controls="tabpanel-id"
on the tab button.span
is replaced with anh2
.aria-label
.<aside aria-label="On page navigation">
for example.text-underline-offset
andtext-decoration-thickness
for example.Also, I don't want this list to come over like a complaint, because Starlight is really, really well made accessibility wise! These are just some of my findings and a deep dive audit of how I normally audit projects at my work. Let me know if these will be taken in consideration, I'll be happy to assist by submitting a PR, especially since I'll be using the theme in the near future and need it as accessible as possible 🙂
Link to Minimal Reproducible Example
https://stackblitz.com/github/withastro/starlight/tree/main/examples/basics?file=README.md
Participation
The text was updated successfully, but these errors were encountered: