I want to debunk things I was confused about when I first started learning about #accessibility, esp. ARIA (Accessible Rich Internet Applications), and give you some tips and everyday references.
Day 5 is #a11y learning 📚 ->
Before HTML5, we only had <div> and <span>, so these fancy things were basically invisible to assistive technology.
ARIA was created created to solve this.
<h1>, <button>, <a> generally don't need ARIA, but <div> and <span> do, especially if they are interactive.
Always use semantic HTML over using ARIA.
It's important to note, ARIA only adds semantics
e.g. <div role="button"> tells a SR "this is a button"
ARIA does NOT add behaviour - keyboard and mouse interaction MUST be added using JavaScript.
Also, "No ARIA is better than Bad ARIA"; using ARIA without understanding it and testing with a screenreader, might break something that WAS accessible before.
Here's an example of a Date Picker - a notoriously inaccessible component on the web:
w3c.github.io/aria-practices…
e.g. <div role="button"> needs to also have tabindex="0" to let users Tab to it, on top of the extra JavaScript to add "space" and "enter" keyboard behaviour.
You don't need tabindex for native interactive elements such as <a> and <button>, it's built in
This is a big problem, because they're used everywhere!
I always check the GitHub Issues and inspect the source code for #accessibility issues before I decide to `npm install` it.
If you're copying HTML or JS from anywhere on the web, chances are you'll need to add keyboard support and ARIA to it.
For example, I recently googled "accessible light dark toggle" and found this amazing article by @SaraSoueidan
sarasoueidan.com/blog/toggle-sw…
You find do book or blog form at inclusive-components.design
You can also watch his conference talks on YouTube
Here are a few #a11y superheroes changing the world:
@ericwbailey
@heydonworks
@marcysutton
@scottohara
@TatianaTMac
@ZoeBijl
It's short, it's simple, you also learn how to use a screen reader.
udacity.com/course/web-acc…
"When developers pay attention to certain coding standards, blind persons are able to participate in digital communication."
Today, digital communication is essential for participating in society.
It's up to us to make sure no one is excluded. ❤️
That's a wrap! 🌯
I hope you enjoyed this #a11y content as much as I enjoyed writing it! There's so much more I could say; this won't be the last you hear from me.
Stay healthy and safe!
Cheers,
Larene
✌️