Daniela Matos de Carvalho
Software Engineer @Dashlane, mother, photographer amateur, former @requirelx organiser, prev @YLDio, @zpx_interactive
Daniela Matos de Carvalho @sericaia
July, 9th
(https://www.who.int/blindness/GLOBALDATAFINALforweb.pdf?ua=1))
> The estimated number of people visually impaired in the world is 285 million, 39 million blind and 246 million having low vision
World Health Organization
website image, demo
> A clean and readable website that uses appropriate landmarks (header, footer, main), where headings (h1, h2, ...) are respected and where all article images had alt attribute.
myself, 1month ago
> ...readable website
> ...appropriate
* landmarks ...
* headings ...
* images
(source https://giphy.com/gifs/dYmSG3I8ucb4BFzu80)
import React from 'react'
import Img from 'gatsby-image'
const Avatar = ({ src }) =>
<Img fluid={src} alt="Daniela's personal picture" />
export default Avatar
// Header.js
<Link to="/" >
<Avatar src={/*...*/} />
</Link>
aria-label="Go to index"
const FancyTitle = ({
title,
color = 'blue',
lettersNumber = 3
}) => {
const firstTextToken = title.substring(0, lettersNumber)
const lastTextToken = title.substring(lettersNumber)
return (
<h2>
<span style={{ color: colors[color] }}>
{firstTextToken}
</span>
{lastTextToken}
</h2>
)
}
const FancyTitle = ({
title,
color = 'blue',
lettersNumber = 3
}) => {
const firstTextToken = title.substring(0, lettersNumber)
const lastTextToken = title.substring(lettersNumber)
return (
<span style={{ color: colors[color] }}>
{firstTextToken}
</span>
{lastTextToken}
</h2>
)
}
<h2 aria-label={title}>
👩💻
🌟
🎧
🤓
🎧
"invisible" icons
meaningful icons
"invisible" icons
aria-hidden='true'
"invisible" icons
const iconToEmoji = {
star: '🌟',
student: '🤓',
podcast: '🎧',
webinar: '👩💻',
}
// ...
<span key={icon} >
{iconToEmoji[icon]}
</span>
aria-hidden="true"
✅ easy fix
meaningful icons
aria-label="highlight post"
// don't do this!
<>
<span style={{ display: 'none' }}>
Please read this
</span>
<span
key={icon}
style={{ marginRight: '0.3rem' }}
>
{iconToEmoji[icon]}
</span>
</>
not that easy fix
meaningful icons
aria-labelledby="please-read-this"
id="please-read-this"
meaningful icons
#readTheDocs
(https://media.giphy.com/media/frv4x1tU4WkXS/giphy.gif)
meaningful icons
aria-describedby on a span or div will be ignored by NVDA and VoiceOver unless given an interactive role, an image or landmark role. JAWS and Talkback are OK."
#readTheDocs
meaningful icons
"Don't use aria-label or aria-labelledby on a span or div unless its given a role."
#readTheDocs
Coderdojo LX
h2
h1
h3
p
...
heading3(h3)
paragraph(p)
<img alt="1_bird.JPG" ...
<img alt="2_flower2.JPG" ... />
<img alt="3_flower3.JPG" ... />
(spoiler: we fail a lot here)
Daniela Matos de Carvalho @sericaia
July, 9th
https://sericaia.me
By Daniela Matos de Carvalho
Software Engineer @Dashlane, mother, photographer amateur, former @requirelx organiser, prev @YLDio, @zpx_interactive