for Webapps

Insights into our learnings
and implementations


Sebastian Herrmann (@herrherrmann)


Web Accessibility (a11y)

"Accessibility is the practice of making your websites usable by as many people as possible."


your app/website

🖥 ⌨️🖱

🖥 ⌨️

🎧 ⌨️

(screen reader user)

Small Improvements


- Header

- Sidebar

- Main


- Create

let's build for
all of them!


  • we're building a large webapp since ~2010:








  • we care about accessibility ❤️
  • at least now (~2018)! 😅
Language                      files          blank        comment           code
Java                           3439          51543           6300         207087
JavaScript                     3208          23249           4121         186510
Groovy                          973          23844           1067          88192
JSON                             29              0              0          86839
LESS                            870           6843            344          34728
HTML                            731           4253            170          25071
CoffeeScript                    462           5902             94          20018
TypeScript                      214           1195            130          10397
XML                              12            361            121           1901
Gradle                           13            321            127           1559
Markdown                         35            467              0           1194
                            ~~ other obscure stuff ~~
SUM:                          10032         118245          12619         664928

Some first steps

Semantic HTML


Semantic HTML

  • Avoid unnecessary nesting (Fragments, anyone?)
                <div class="inline-content">
                    <span class="table-text">
                            Some content

Semantic HTML

  • Avoid unnecessary nesting (Fragments, anyone?)
  • Use role="presentation" for decorative elements
                <div class="inline-content" role="presentation">
                    Some content

HTML5 + Landmarks

<header role="banner">
   <p>Put company logo, etc. here.</p>
<nav role="navigation">
      <li>Put navigation here</li>
<main role="main">
   <p>Put main content here.</p>
<footer role="contentinfo">
   <p>Put copyright, etc. here.</p>

ARIA tags


If you need a lot of ARIA and role tags,
you're probably not using HTML5 properly!

…but there are some valid use cases.

Common ARIA tags

  • aria-label to add context to an icon-only button:



  • aria-hidden to hide invisible content from screen readers
  • aria-live for content updates (e.g. announcers)
  • aria-required and/or aria-invalid for inputs
  • probably more, depending on your features…
<button type="button" aria-label="Edit Details">
    <svg><!-- some pencil icon --></svg>

ARIA tags Example

  <div id="header_search_bar-description">
    Type to search. Use arrow keys to navigate results.
    placeholder="Type a user name…"
  <label for="header_search_bar-search_input-input">
      aria-label="Cancel search"
      <svg><!-- some "X" icon --></svg>

ARIA tag support

  • There are specs
  • …but they're not implemented consistently
  • So test it yourself!

Fix your Focus

  • Make interactive elements accessible via tabbing!
  • Use a sensible focus order:
    • tabindex="-1" prevents tabability
    • tabindex="0" adds tabability in the normal flow
    • tabindex="1" (and above) should be prevented
<button tabindex="-1">You can't tab me</button>
<div tabindex="0">You can tab me</div>
<div tabindex="2">You can tab me last</div>
<div tabindex="1">You can tab me next</div>

Fix your Focus II

  • Use an obvious focus style!
  • Don't just reset via :focus { outline: none; }
  • We like a "hard" box-shadow that doesn't affect the layout flow:
.button:focus {
    outline: none;
    box-shadow: 0 0 0 2px @SIBlue;

Fix your Focus III

There's much more!

Wow, a11y is a large topic!
Where do I go from here?


A11y in your workflow

Development setup:

A11y in your workflow

Testing/QA phase:

Screen Readers

Screen Reader Demo!

Screen Readers


  • Spread awareness and focus on tackling the most important issues to get started from "zero"

Style Guide

  • Helps to build consistent, documented components
  • Playground for testing components in isolation


  • Incorporating a11y concerns into your daily workflows is already a step forward
  • Spread awareness about this topic, internally and externally
    • Share your learnings and efforts (blog, conference, open source project, …)



  • A11y is a complex topic
  • A11y is an important topic
  • Knowing about a11y will make you a better web developer
  • Start slowly and steadily (instead of big bang)
  • There are many resources out there
  • Check what others have built
  • Test, test, test (automatically and manually)
  • Keep the topic alive over time


✌️ Thanks a lot!

Accessibility for Webapps

By Sebastian Herrmann

Accessibility for Webapps

Insights into our learnings and first steps of implementing accessibility for large webapps.

  • 2,681