Respecting User Preferences
on the Web

Mangfold i mai · Eric Eggert

Slides: slides.yatil.net/user-preferences.html

Eric Eggert (he/him/his)

  • šŸ‡©šŸ‡Ŗ Co-founder & Co-owner of outline Consulting (2011)
  • šŸ‡øšŸ‡Ŗ Web Accessibility Specialist at Axess Lab (2022)
  • šŸ‡¦šŸ‡¹ Lecturer at FH Joanneum (2015)
  • šŸ‡ŗšŸ‡ø Director of Accessibility Services at Knowbility (ā€™16ā€“ā€™22)
  • šŸŒ Web Accessibility Specialist at W3C/WAI (ā€™13ā€“ā€™20)

šŸ“ Wissen, Germany šŸ‡©šŸ‡Ŗ

Users

No User
is the Same

The ā€œAverage Manā€?

Thanks Matt!

Does The Average Person Exist? ā€” standupmaths


Why do we design like they are?


Why do we develop like they are?

What Does Inclusive Design Even Mean?


Screen Reader Differences

VoiceOver and Safari remove list element semantics when list-style: none is used.

Scott Oā€™Hara: ā€œFixingā€ Lists

All web developers

This was a purposeful change due to rampant
ā€˜listā€™-itis by web developers.

James Craig, Apple, bugs.webkit.org

What does it mean for me, as a web developer, that Safari is not reading lists, when they donā€™t look like a list?

John Doe-veloper

Nothing.

A Time Line

  • 2014: First Commit
  • 2015: Additional Code
  • ā€¦
  • 2019: The Web Notices

Customers seem much happier in the 3 years since this change went in.

James Craig, Apple, bugs.webkit.org

dowebsitesneedtolookexactlythesameineverybrowser.com

The same is true
for screen readers:
They donā€™t all need to
produce the same output.

VoiceOver Utility/Verbosity/Speech
VoiceOver Utility/Verbosity/Text
VoiceOver Utility/Speech/Pronunciation

There is no control

ARIA can help,
but not in
every situation.

Accessibility is not
only Screen Readers

Most non-Screen-Reader
assistive technology does
not work well with ARIA.

List of supported ARIA roles and properties in dragon from the following blog post

How Dragon Naturally Speaking works with ARIA Ā» Simply Accessible (2014)


High Contrast Mode

Links and fake links in light mode
Links and fake links in dark mode
Butttons and fake buttons in light and dark modes

Users!

Variable levels of knowledge of their AT

Users often donā€™t know what their computers can do for them.

Other users hack assistive technology to work with inaccessible sites.

Some users write CSS and JavaScript to change websites to their needs.

User =
Disability Type × Proficiency × Accessibility Support

More Tools


Reader Mode

Reader Mode Support

  • Safari (since 2010, can set to default since 2015)
  • Firefox (2015)
  • Edge (2015)
  • Chrome (soon??????)


More Website Settings

Safari Site Settings Panel
Safari Settings; Websites Panel

Leveraging
Operating System
Preferences

MacOS System Preferences; Accessibility Panel

prefers-reduced-motion
Media Query

            @media (prefers-reduced-motion: reduce) {
  * {
      transition: none !important;
      animation: none !important;
  }
}
          

Or, progressively enhanced:

            @media (prefers-reduced-motion: no-preference) {
  /* All animation code */
}
          

ā€œDefensive use of prefers-reduce-motionā€ Ć  la Patrick H. Lauke

Prefers Reduced Motion Support Table

Source: Can I Use

On Windows ā€¦ itā€™s complicated

Short note on prefers-reduced-motion and puzzled (Windows) users by Patrick H. Lauke @ TPG Blog

prefers-color-scheme
Media Query (Dark Mode)

            :root {
  --color: #333;
  --bgcolor: #eee;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color: #eee;
    --bgcolor: #333;
  }
}

html {
  color: var(--color);
  background-color: var(--bgcolor);
}
          
Prefers Color Scheme Support Table

Source: Can I Use

But waitā€¦
Thereā€™s more!

inverted-colors MQ

  • none
  • inverted

Experimental. Supported in Safari macOS & iOS.

prefers-contrast MQ

  • no-preference
  • more
  • less

Experimental. Supported in Blink and Safari.

forced-colors MQ

  • none
  • active

Experimental. Supported in Blink and Firefox. (And generally mostly on Windows, similar to -ms-high-contrast.)

User preferences come in
different combinations

  • Test with diverse settings and users
  • Let users decide which tools they need, including assistive tech
  • Describe, not prescribe the user interface
  • Support existing conventions and defaults

Thank you!

Eric Eggert