Professional Documents
Culture Documents
Scottjehl
Scottjehl
Accessibility
Scott Jehl
Performance is
part of Accessibility
Scott Jehl
https://blog.chriszacharias.com/page-weight-matters
Using a screenreader, audio described
https://marcysutton.com/accessibility-and-performance
Can optimizing performance
un-optimize accessibility?
It depends on how we
define fast…
https://developers.google.com/web/fundamentals/performance/user-centric-performance-metrics
https://developers.google.com/web/tools/lighthouse/
https://developers.google.com/speed/pagespeed/insights/
https://developers.google.com/speed/pagespeed/insights/?url=https%3A%2F%2Fwww.cnn.com
"Perceived" Performance
https://developers.google.com/web/fundamentals/performance/user-centric-performance-metrics
"Is it accessible?"
Visible doesn't mean meaningful
http://www.filamentgroup.com/lab/weight-wait.html
TTFB
?
Speeding up TTFB
BLANK
SCREEN
CSS
JS
JS
https://httparchive.org/reports/loading-speed
The render blockers
<head>
<script src="site.js"></script>
</head>
Unblocking render: async JS
<head>
</head>
https://medium.com/the-telegraph-engineering/improving-third-party-web-performance-at-the-telegraph-a0a1000be5
Unblocking render: async CSS
<head>
<link rel="stylesheet" href="site.css"
media="print">
</head>
Unblocking render: defer
<head>
</head>
Carry what you need
Pushing Files
index.html please?
<head>
</head>
Push on .html requests
</If>
Inlining files
“
If the external CSS resources are small, you
can insert those directly into the HTML
document, which is called inlining.
PageSpeed Insights
https://developers.google.com/speed/docs/insights/OptimizeCSSDelivery
Inlining CSS
<head>
<style>
.header { background: #09878}
h1 { font-size: 1.2em; col… }
h2 { margin: 0; }
…
</style>
</head>
https://www.filamentgroup.com/lab/inlining-cache.html
Break files by global / local
<head>
<script src="global.js"></script>
<script src="homepage.js"></script>
</head>
To recap, free up first paint
Inlining
Or Server push
<picture>
<source srcset="large.png" media="(min-width:
800px)">
<source srcset="medium.jpg" media="(min-width:
400px)">
<img src="small.jpg" alt="…">
</picture>
Responsive images negotiate types too!
<picture>
<source srcset="awesome.webp" type="image/webp">
<img src="cool.jpg" alt="Alt Text!">
</picture>
https://addyosmani.com/blog/lazy-loading/
Loading Video
Performantly
Video - like picture syntax!
Standard
Optimized
CSS font-display
@font-face {
font-family: “Nice Serif”;
src: url(niceserif.woff2);
font-display: swap;
}
h1 {
font-family: “Nice Serif”, “Georgia”, serif;
}
Over-reliance on
JavaScript
for Content
Empty Body = Fragile/Slow!
<body>
<div id="app"></div>
</body>
<script>
createApp( "#app", data );
</script>
https://css-tricks.com/server-side-react-rendering/
TTI
Time To Interactive
The time at which a page becomes interactive (events
wired up, etc).
https://medium.com/@addyosmani/the-cost-of-javascript-in-2018-7d8950fbb5d4
https://www.filamentgroup.com/lab/select-css.html
https://www.filamentgroup.com/lab/select-css.html
We need more
inclusive
web performance metrics
https://github.com/GoogleChrome/lighthouse/issues/11049
Accessibility and
performance are not
enhancements.
“
My hope for coming out of this
pandemic is that we don’t return
to the status quo. Many don’t
realize that “normal” was actually
not great for a lot of people.
Alice Wong
https://www.esquire.com/news-politics/a32474779/alice-wong-interview-coronavirus-covid-19-lessons/
If a site isn’t accessible,
it isn’t done yet
Thank you!
Find me:
• @scottjehl
• scottjehl.com
• filamentgroup.com
New Course!