Skip to content

Instantly share code, notes, and snippets.

@blzaugg
Last active August 29, 2015 13:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save blzaugg/9813439 to your computer and use it in GitHub Desktop.
Save blzaugg/9813439 to your computer and use it in GitHub Desktop.

Accessibility Guide

Notes and guide to Accessibility techniques.

ARIA Roles

landmark (abstract role)

  • A region of the page intended as a navigational landmark for quick assess. Such as navigating, searching, primary content, etc.

  • main

    • Superclass Role: landmark
    • The main content of a document.
    • Non-obtrusive alternative for "skip to main content" links
    • No more than one element with the main role.
  • application

    • Superclass Role: landmark
    • A region declared as a web application, as opposed to a web document.
  • banner

  • complementary

  • contentinfo

  • form

  • navigation

  • search

structure (abstract role)

Structures organize content in a page. Structures are not usually interactive.

TODO: Expound

  • document
    • Superclass Role: structure
    • A region declared as document content, as opposed to a web application.
  • article
  • directory
  • group
  • heading
  • img
  • list
  • listitem
  • note
  • presentation
  • region
  • separator
  • toolbar

widget

W3C Widget Roles

TODO: Expound

  • button
  • link
  • radio
  • radiogroup
  • tab
  • tabpanel
  • tablist
  • tree
  • treeitem
  • menu
  • menubar
  • combobox
  • listbox

ARIA Attributes

These attributes are used to support the widget roles.

TODO: Expound

Widget Attributes

  • aria-autocomplete
  • aria-checked (state)
  • aria-disabled (state)
  • aria-expanded (state)
  • aria-haspopup
  • aria-hidden (state)
  • aria-invalid (state)
  • aria-label
  • aria-level
  • aria-multiselectable
  • aria-pressed (state)
  • aria-readonly
  • aria-required
  • aria-selected (state)

Live Region Attributes

TODO: Expound

  • aria-atomic
    • false (default): Changes to the live region is presented alone, rather than the whole content. This prevents users from hearing redundant content repeatedly.
    • true: The live region are presented as a whole, rather than just announcing the parts that changed.
  • aria-busy (state)
  • aria-live
    • off (default): Updates to live regions are ignored. Good for secondary content which is frequently updated.
    • polite: Waits to announce updates, after the user not busy (reading, navigating).
    • assertive: Interrupt user immediately, possibly clearing current read buffer.
  • aria-relevant

Relationship Attributes

TODO: Expound

http://www.w3.org/TR/wai-aria/states_and_properties#attrs_relationships

Forms

Labels

  • Every <lable> needs a for attribute, pointed to a valid form control's id, or needs to wrap the form control it belongs to.
<label for="inputId">Label Text</label>
<input id="inputId">

<!-- or -->

<label>
    Label Text
    <input>
</label>

Inputs

Managing Focus

TODO: Expound

http://www.w3.org/TR/wai-aria/usage#managingfocus http://www.w3.org/TR/2013/WD-wai-aria-practices-20130307/#kbd_focus

Unorganized TODOs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment