Nothing
We transform grand ideas into pioneering products. With the power of design.
Nothing AG, Berne
Goal:
Become a well-known "accessible-first" web
company in (and outside) Switzerland
<a href="…">
Click me!
</a>
<span onclick="location.href='…'">
Click me!
</span>
Why? 🤔
<a href="…">
Click me!
</a>
<span onclick="location.href='…'">
Click me!
</span>
<a href="…">
Click me!
</a>
<span onclick="location.href='…'"
class="link"
tabindex="0"
role="link">
Click me!
</span>
<style>
.link {…}
.link:hover {…}
.link:focus {…}
.link:active {…}
</style>
Codepen: tiny.cc/gaad21-links 🔗
<a href="…">
Click me!
</a>
<span onclick="location.href='…'"
class="link"
tabindex="0"
role="link">
Click me!
</span>
<style>
.link {…}
.link:hover {…}
.link:focus {…}
.link:active {…}
</style>
😃
would anyone do this?!
<span onclick="location.href='…'">
Click me!
</span>
<select>
<option id="cat">Cat</option>
<option id="dog">Dog</option>
</select>
<style><!-- Won't have an effect -->
select { font-weight: bold; }
#cat { background-color: blue; }
#dog { background-color: red; }
</style>
<div role="listbox">
<div role="option" id="cat">Cat</div>
<div role="option" id="dog">Dog</div>
</div>
<style>
[role=listbox] { font-weight: bold; }
#cat { background-color: blue; }
#dog { background-color: red; }
</style>
<!-- No such thing -->
<tablist>
<tab id="tab1">Tab 1</tab>
<!-- And more tabs -->
<content for="tab1">
Content 1
</content>
<!-- More content -->
</tablist>
Quite a few well established usage patterns without HTML equivalent.
Requires to tinker own custom solution.
<ul role="tablist">
<li role="tab">
<a href="#section1" role="presentation"
id="tab1" aria-selected="true">
Tab 1
</a>
</li>
</ul>
<section id="section1" role="tabpanel"
tabindex="-1" aria-labelledby="tab1">
Content 1
</section>
<div role="listbox">
<div role="option" id="cat">Cat</div>
<div role="option" id="dog">Dog</div>
</div>
<style>
[role=listbox] { font-weight: bold; }
#cat { background-color: blue; }
#dog { background-color: red; }
</style>
If you can use a native HTML element (or attribute) with the semantics and behavior you require, then do so. Do not instead re-purpose an element and add an ARIA role, state or property to make it accessible.
Source: w3.org/TR/using-aria/#rule1 🔗
Source: w3.org/TR/using-aria/#rule1 🔗
There (nearly) always exists a native element, even when not obvious at first sight!
If you can use a native HTML element (or attribute) with the semantics and behavior you require, then do so. Do not instead re-purpose an element and add an ARIA role, state or property to make it accessible.
Come on!
of radio buttons!
<input type="radio" name="hobbies" id="dancing">
<label for="dancing">Dancing</label>
<input type="radio" name="hobbies" id="gardening">
<label for="gardening">Gardening</label>
Only tiny bit of JavaScript / ARIA!
💪💪💪
<a href="…">
Click me!
</a>
<span onclick="location.href='…'"
class="link"
tabindex="0"
role="link">
Click me!
</span>
When you're tempted to glue together some random <div> / <span> elements with JavaScript handlers
Our competences: nothing.ch/accessibility
Thank you.
By Nothing