WAI-ARIA in 5 steps

Sergei Kriger

WAI-ARIA in 5 steps

Sergei Kriger @_sergeikriger

SinnerSchrader logo.

Sergei Kriger @_sergeikriger

AA

WAI-ARIA

Web Accessibility Initiative —
Accessible Rich Internet Applications

Assistive Technologies

Berlin JS logo

BerligJS logo

We don't live in the bubble

Soap bubble

HTML, CSS and JS

5

#1 Don't Use ARIA

Sign in button

Sign in

Sign in button as div in devtools

Sign in
Screenshot: Button as div in devtools

Google sign-in button with devtools

Google sign-in button Screenshot: Google sign-in button with devtools

#2 Roles

What

Plain List

Arrow Arrow

Inline List

Arrow Arrow

Landmarks

ARIA Attributes

<header> <main> <footer>
<nav> <article>

#3 States and Props

What it does

Tabs

Tabs demo

London, the capital of England and the United Kingdom, is a 21st-century city with history stretching back to Roman times.

ARIA attributes

role="tablist" role="tab" role="tabpanel" aria-selected="true" aria-controls="IDREF" aria-labelledby="IDREF"

#4 Accessible Names

Plain text

         
        <p>Don't Worry Be Happy</p>
         
      

Don't Worry Be Happy

Pseudo elements

           
          <p>Don't Worry Be Happy</p>
           
        
          p::before {
            content: 'Before';
          }
          p::after {
            content: 'After';
          }
        

BeforeDon't Worry Be HappyAfter

Controls

         
        <input type="checkbox"> Subscribe
         
      

Controls

         
        <label>
          <input type="checkbox"> Subscribe
        </label>
         
      

Subscribe

Labels & Descriptions

         
        <button>
          <img src="signin.svg">
        </button>
         
      

Labels & Descriptions

         
        <button>
          <img alt="Icon" src="signin.svg">
        </button>
         
      

Icon

Labels & Descriptions

         
        <button aria-label="Sign in">
          <img role="presentation" src="signin.svg">
        </button>
         
      

Sign in

Labels & Descriptions

        <h2 id="ref-1">Sign in</h2>
        <div id="ref-2">Fill your email and password.</div>
         
        <button aria-labelledby="ref-1"  aria-describedby="ref-2">
          <img src="signin.svg">
        </button>
      

Sign in   Fill your email and password.

Priority

* Very approximately. Needs to be tested with ATs.

Spec vs. Reality

#5 Focus

Recap

Thanks!.. Questions?

@_sergeikriger

Credits

Icons made by Freepik from www.flaticon.com is licensed by CC 3.0 BY
Icons made by Google from www.flaticon.com is licensed by CC 3.0 BY
Icons made by Smashicons from www.flaticon.com is licensed by CC 3.0 BY
Rudloff [CC BY 3.0], via Wikimedia Commons
Icons made by Hadrien from www.flaticon.com is licensed by CC 3.0 BY