AOM-nom-nom

A presentation at role=drinks in June 2018 in Amsterdam, Netherlands by bruce lawson

Slide 1

Slide 1

@brucel AOM-nom-nom!

Slide 2

Slide 2

@brucel

Slide 3

Slide 3

Slide 4

Slide 4

@brucel Wix • enable navigation by keyboard • provide Screen Reader compatibility • build infrastructure for accessibility development and testing.

Slide 5

Slide 5

@brucel

Slide 6

Slide 6

@brucel

Slide 7

Slide 7

@brucel “Perfect is the enemy of Good”

Slide 8

Slide 8

@brucel “Perfect is the enemy of Good”

Slide 9

Slide 9

@brucel

110

million

Slide 10

Slide 10

@brucel Stylable is a CSS preprocessor for styling components with typed CSS.

Slide 11

Slide 11

@brucel Photo: F. Antolín Hernandez

Slide 12

Slide 12

@brucel

Slide 13

Slide 13

@brucel

Slide 14

Slide 14

@brucel

Slide 15

Slide 15

@brucel “HTML 4.0 developments inspired by concerns for accessibility include the requirement that alternate text accompany an image included via the   IMG   element.

Slide 16

Slide 16

@brucel

Slide 17

Slide 17

@brucel HTML Design Principles Design features to be accessible to users with disabilities. Access by everyone regardless of ability is essential.

This does not mean that features should be omitted entirely if not all users can make full use of them, but alternate mechanisms should be provided.

HTML Design Principles - https://www.w3.org/TR/html-design-principles/

Slide 18

Slide 18

@brucel

Slide 19

Slide 19

@brucel Ajax / “Web 2.0” By decoupling the data interchange layer from the presentation layer , Ajax allows for Web pages, and by extension Web applications, to change content dynamically without the need to reload the entire page .

Slide 20

Slide 20

@brucel WAI ARIA WAI-ARIA provides a framework for adding attributes to identify features for user interaction, how they relate to each other, and their current state.
WAI-ARIA describes new navigation techniques to mark regions and common Web structures as menus, primary content, secondary content, banner information, and other types of Web structures.

Slide 21

Slide 21

@brucel ARIA landmark roles role="contentinfo", "main", "banner" ...

Slide 22

Slide 22

Built-in beats bolt-on

Slide 23

Slide 23

@brucel

Slide 24

Slide 24

@brucel

Slide 25

Slide 25

@brucel Photo: Brittany Shaw

Slide 26

Slide 26

@brucel

Slide 27

Slide 27

@brucel ARIA isn’t a magic bullet You still need to

• maintain state and value

• make sure things are keyboard-focusable

• listen for keypresses

• deal with live regions

Slide 28

Slide 28

@brucel Web Components

Slide 29

Slide 29

@brucel

Slide 30

Slide 30

@brucel Web Components WTF? Web components are a set of web platform APIs that allow you to create new custom, reusable, encapsulated HTML tags to use in web pages and web apps .

https://www.webcomponents.org/introduction

Slide 31

Slide 31

@brucel JavaScript frameworks

Slide 32

Slide 32

@brucel Custom elements <lovely-button>Click me!</lovely-button>

Slide 33

Slide 33

@brucel .. or semantically neutral

<div>Click me!</div>

Slide 34

Slide 34

@brucel dannynorton  

  https://www.flickr.com/photos/dannynorton/186795352/

Slide 35

Slide 35

@brucel accessibility object model F Delventhal https://www.flickr.com/photos/krossbow/10324856173/

Slide 36

Slide 36

@brucel wicg.github.io/aom/spec/ • Alexander Surkov, Mozilla
• Alice Boxhall, Google
• Dominic Mazzoni, Google
• James Craig, Apple

enable

blink

features

AccessibilityObjectModel

Slide 37

Slide 37

@brucel Current gaps • Leaky abstractions

• IDrefs

• No way to capture input events from Assistive Technology

• Every accessible node requires a DOM element.

• No introspection

Slide 38

Slide 38

@brucel

Slide 39

Slide 39

@brucel Eric Hunt https://en.wikipedia.org/wiki/Brussels_sprout#/media/ File:Brussels_sprout_closeup.jpg

Slide 40

Slide 40

@brucel Sprouting ARIA attributes <custom-slider

min

"0"

max

"5"

value

"3"

</custom-slider>
<!-- Custom element is forced to "sprout" extra attributes to express semantics -->

<custom-slider

min

"0"

max

"5"

value

"3"

role

"slider"

tabindex

"0"

aria-valuemin

"0"

aria-valuemax

"5"

aria- valuenow

"3"

aria-valuetext

"3"

</custom-slider>

Slide 41

Slide 41

@brucel Phase 1 of AOM

<div

role

"checkbox"

aria-checked

“true"

Receive promotional offers

</div> can be replaced by:

el . accessibleNode . role

"checkbox" ;

el . accessibleNode . checked

=

true ;

Slide 42

Slide 42

@brucel Cleaner code <custom-checkbox

checked

Receive promotional offers </custom-checkbox>

Slide 43

Slide 43

@brucel AOM vs ARIA • While AOM and ARIA both affect the computed accessible properties of a node, and have the same vocabulary, they are separate interfaces.

• They don’t reflect each other.

• If an AOM Accessible Property and the corresponding ARIA attribute have different values, the AOM property takes precedence.

Slide 44

Slide 44

IDrefs

Slide 45

Slide 45

@brucel IDs in HTML associate

<div

id

"firstname"

First name:

</div>

<input

aria-labelledby

"firstname"

aria-activedescendant indicates a descendant that's focused in a composite control like a list box.

<div

role

"listbox"

aria-activedescendant

"item1"

tabindex

"0"

<div

role

"option"

id

"item1"

Item 1

</div> <div

role

"option"

id

"item2"

Item 2

</div> <div

role

"option"

id

"item3"

Item 3

</div> </div>

Slide 46

Slide 46

@brucel Impossible across components <custom-listbox>

<custom-option

id

"item1"

Item 1 </custom-option>

<custom-option

id

"item2"

Item 2 </custom-option>

<custom-option

id

"item3"

Item 3 </custom-option>

</custom-listbox>

Slide 47

Slide 47

@brucel New! Improved! AOM! const input

comboBox.shadowRoot.querySelector(

“input" ); const optionList

comboBox.querySelector(

"custom-optionlist" ); input.accessibleNode.activeDescendant

optionList.accessibleNode;

Slide 48

Slide 48

AT input events

Slide 49

Slide 49

@brucel

Slide 50

Slide 50

@brucel Accessible Actions • Accessible Actions gives web developers a mechanism to listen for accessible actions directly, by adding event listeners on an   AccessibleNode .

• This is analogous to listening for user interaction events on a DOM node, except that the interaction event arrives via an assistive technology API, so it is directed to the accessible node first.

Slide 51

Slide 51

AOM phases

Slide 52

Slide 52

@brucel Phase 1 Modifying Accessible Properties, will allow   setting   accessible properties for a DOM element, including accessible relationships.

Slide 53

Slide 53

@brucel Phase 2 Accessible Actions, will allow   reacting   to user actions from assistive technology.

Slide 54

Slide 54

@brucel Phase 3

Virtual Accessibility Nodes, will allow the creation of accessibility nodes which are not associated with DOM elements.

Slide 55

Slide 55

@brucel Phase 4 Computed Accessibility Tree, will allow   reading   the computed accessible properties for accessibility nodes, whether associated with DOM elements or virtual, and walking the computed accessibility tree.

Slide 56

Slide 56

@brucel Why is Phase 4 last? “the accessibility tree is not standardized between browsers: Each implements accessibility tree computation slightly differently. In order for this API to be useful, it needs to work consistently across browsers

We want to take the appropriate time to ensure we can agree on the details for how the tree should be computed and represented”.

Slide 57

Slide 57

@brucel Users users users! “Compared to the previous three phases, accessing the computed accessibility tree will have the least direct impact on users ”

Slide 58

Slide 58

@brucel Priority of Constituencies In case of conflict, consider users over authors over implementors over specifiers over theoretical purity .

HTML Design Principles - https://www.w3.org/TR/html-design-principles/

Slide 59

Slide 59

Crowd image!!

Slide 60

Slide 60

Slide 61

Slide 61

Slide 62

Slide 62

@brucel Priority of Constituencies

Slide 63

Slide 63

Thank you thank you
thank you
to
Alice Boxhall (@sundress)

Slide 64

Slide 64

Thank YOU! xxx @brucel