HTML and accessibility

20
HTML and accessibility

Transcript of HTML and accessibility

Page 1: HTML and accessibility

HTML and accessibility

Page 2: HTML and accessibility

@kitation

Hello!

• Chad Gowler (they/them)

• 7 years as a web developer (Python, Ruby, React)

• MSc HCIT at York University

Page 3: HTML and accessibility

The web is for everyone

Page 4: HTML and accessibility

Everyone needs to use the web

Page 5: HTML and accessibility

@kitation

HTML is the key• Accessible out of the box

• Browsers know what they’re doing

• With no HTML, there is no web

• HTML is easy to break

Page 6: HTML and accessibility

@kitation

Page 7: HTML and accessibility

@kitation

Page 8: HTML and accessibility

@kitation https://webaim.org/projects/screenreadersurvey7/

Page 9: HTML and accessibility

@kitation

Page 10: HTML and accessibility

@kitation

Page 11: HTML and accessibility

@kitation

Headings• Always keep them in semantic order

• Only 1 H1, ideally with the document title

• Don’t use them for styling

• Think about them as landmarks

Page 12: HTML and accessibility

@kitation

Page 13: HTML and accessibility

@kitation

Page 14: HTML and accessibility

@kitation

Go to next element

Opening a list

Choosing an itemPerforming an action

Page 15: HTML and accessibility

Focus

Page 16: HTML and accessibility

@kitation

Focus• Form elements, buttons, links that

do not have a disabled attribute

• Links MUST have a href

• Focus order is top to bottom of the HTML

• tabIndex=“0” / tabIndex=“-1”

https://git.io/vN28v

Page 17: HTML and accessibility

@kitation

Descriptive links• All links should be descriptive

• No more lists of “Read more!”

• Images should have alt text

• Use alt=“” to hide it from the screenreader

Page 18: HTML and accessibility

@kitation https://github.com/pa11y/pa11y

Page 19: HTML and accessibility

@kitation

Page 20: HTML and accessibility

@kitation

I need to do what now?

• Add screenreader to your list for cross-browser testing

• Check out tools

• Pick up HTML errors at code review