Lock in $30 Savings on PRO—Offer Ends Soon! ⏳

A11Y workshop

danielwang
March 11, 2020
22

A11Y workshop

danielwang

March 11, 2020
Tweet

Transcript

  1. Agenda Why accessibility matters? Accessibility Guidelines & Standards Accessibility layers

    • Visual design for A11y • Coding for A11y Testing Tools Next actions
  2. PageUp main users groups Keyboard users Use keyboard rather than

    mouse Have full sight Low vision users Color blindness Magnify content by zoom Screen reader users Use screen reader software Have no sight
  3. WCAG 2.1 Web Content Accessibility Guidelines 78 total criteria organized

    as 13 guidelines under 4 principles Perceivable Users must be able to perceive the information being presented Operable Users must be able to operate the interface Understandable Users must be able to understand the information on the interface Robust Users must be able to access the content as technologies advance
  4. A11y Layers Code HTML, CSS, JS, ARIA Visual Design Color

    contrast, icons, typography, layout, responsive, touch targets Focus states, active indicator Content Information architecture, images, videos, captions, simple language
  5. Coding for A11y - HTML Native HTML5 = Semantic markup

    = Accessibility <a> <button> <input type=”phone” required /> <select> Native HTML tag <nav> <header> <main> <section> <figure> <h1> <table> Semantic <div> <span> <p> <b> <i> Non semantic
  6. Coding for A11y - ARIA tags Web Accessibility Initiative (WAI)

    Accessible Rich Internet Applications (ARIA) ARIA is a specification from the W3C and created to improve accessibility of applications by providing extra information to assistive technologies, such as screen readers, via attributes which could be added to HTML. Roles States and Properties
  7. Coding for A11y - ARIA tags Disabled Hidden Selected Checked

    Drag and drop Live regions Modal States and Properties Button Checkbox Link Radio Scrollbar Searchbox Slider Switch Tab Tabpanel Option Progressbar Textbox Treeitem Widgets Banner Complementary Contentinfo Form Main Navigation Search Application Landmarks
  8. <body> <a href="#gel-main" class="sr-only sr-only-focusable" >Skip to main content </a>

    <nav id="gel-navbar" class="navbar navbar-expand-sm navbar-dark bg-navy" role="navigation"> </nav> <aside id="gel-menu" role="sidebar"> <a href="#" class="nav-toggle close" aria-label="Close menu" aria-expanded= "false"> <i aria-hidden= "true" class="gel-icon-close gel-icon-lg" ></i> </a> <a href="../" class="logo"> <img alt="brand logo" src="../site-images/pu-logo.png" width="100" /></a> <article class= "user-menu"> </article> <menu class="scroll" role="menu"> </menu> </aside> <header id="gel-header" role="banner"> </header> <main id="gel-main" role="main"> <section class= "container"> </section> </main> • Accessible • Semantic
  9. Coding for A11y - CSS Don’ts :before, :after { content:

    “previous page” } :hover {} px DO’s :focus {} :active{} rem
  10. Coding for A11y - CSS .sr-only { position: absolute; width:

    1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; } <a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown" aria-expanded="false"> <i class="gel-icon-help gel-icon-lg" aria-hidden="true"></i> <span class="sr-only">Help</span> </a>
  11. Coding for A11y - JavaScript function toggleMenu() { menuIcon.addEventListener('click', function

    () { sideBar.classList.toggle('open'); if (sideBar.classList == "") { setAriaExpanded('false'); } else { setAriaExpanded('true'); } }); } // screen reader accessibility function setAriaExpanded(val) { for (var i = 0; i < menuIcons.length; i++) { menuIcons[i].setAttribute('aria-expanded', val); } }
  12. A11Y - Assistive Technology - Screen Readers VoiceOver + Safari

    NVDA + Internet Explorer JAWS + Firefox
  13. What is next? Phase 1 • Run the evaluation tools

    • Start from visual accessibility • Focus on keyboard navigation Phase 2 • Content accessibility • Screen reader