Upgrade to Pro — share decks privately, control downloads, hide ads and more …

React + Accessibility (M16Y) = Awesome web for ...

React + Accessibility (M16Y) = Awesome web for the next billion users

Creating platforms for everyone to use is very important in today's world, this talk focuses on methods to build platforms that are accessible to current users and the next billion users.

Obinna Ekwuno

August 17, 2019
Tweet

More Decks by Obinna Ekwuno

Other Decks in Programming

Transcript

  1. Hello! I AM OBINNA EKWUNO Media Developer Expert @ Cloudianry

    Technical Writer @ Scotch.io & LogRocket Community organizer forloop Enugu, JAMstack Israel You can find me at @Obinnaspeaks 3
  2. Talk Goals ⋆ Understand Web accessibility and Implementation ⋆ Discuss

    Terms associated with Web accessibility ⋆ Understand the importance of this concept ⋆ The challenges and solutions in #a11y and #M16y ⋆ Learn to use React Fragments 4
  3. Terms used a lot in the community ⋆ #a11y =>

    Accessibility ⋆ #m16y => Media Accessibility ⋆ WAI – Web Accessibility Indicatives ⋆ ARIA – Accessible Rich Internet Applications
  4. ⋆ What is focus ⋆ Focusable elements ⋆ Non-focusable elements

    ⋆ Logical tab order ⋆ Using the tab order to get something off screen that should only be focusable when it appears
  5. ⋆ Focus management – knowing when to change the tab-index

    of a none focusable element to be added in the tab order by calling the focus method on it because a user requested it
  6. 16

  7. What about it ? ⋆ A screen reader provides the

    DOM tree in form of speech ⋆ What type of element – ROLE , NAME/LABEL, VALUE,STATE
  8. What about it ? ⋆ Helps to modify attributes on

    an element which helps fix how they are viewed in the accessibility tree
  9. 21

  10. 22

  11. 23

  12. THINGS ARIA CAN NOT DO ⋆ Modify element appearance ⋆

    Modify element behavior ⋆ Add focusability ⋆ Add keyboard event handling 24
  13. THINGS ARIA CAN DO ⋆ Modify accessibility tree ⋆ Add

    semantics to an element when no semantics exists ⋆ Modify semantics ( adding role of switch to a button to set state) 25
  14. THINGS ARIA CAN DO ⋆ Express MORE UI patterns ⋆

    Provide extra labels and descriptions (aria-label ) ⋆ Can provide extended semantic relationship elements ⋆ Works with assistive technology (role alert ) 26
  15. Note worthy aria tips ⋆ The role attribute should always

    be on the same element as the tab index =0 27
  16. 28

  17. Elements of media Accessibility ❖Color Usage – How we combine

    colors ❖Text – Text and background ❖Design elements in the platforms
  18. Tritanopia ( Blue and Green / Yellow and violet )

    Solution – Implement contrasting color background with text (Add example)
  19. Achromatopsia ( The don’t see color ) Solution – Add

    tags so they can activity see what color things are
  20. 37

  21. More pointer on solving problems on M16Y? - Using CLEAR

    COMMUNICATION Icons with text (Don’t use icons with color backgrounds) - WAI – ARIA – Dom + ARIA - Readability
  22. Quick Points to note ⋆ The core focus of web

    accessibility lies in Semantic HTML ⋆ JSX supports accessibility ⋆ React Fragments are Awesome ! ⋆ Use of aria-* attributes
  23. Advantages of using React Fragment. ⋆ Improves efficiency of code

    ⋆ Better manage memory ⋆ Reduces cumbersome code structures
  24. Tools to check out - Axe Axe-core (Chrome extension &

    Tool) - M16Y plugin - No coffee simulator ( chrome extension ) - Light house
  25. Last words - Intuitive ( The baby test ) -

    Alt and description is awesome - Pay attention to color combination - Test for accessibility with axe or lighthouse
  26. Resources ⋆ No Coffee ⋆ Pa11y ⋆ Tota11y ⋆ Tenon

    ⋆ Voice Over ⋆ Wave ⋆ M16Y plugin