-
Notifications
You must be signed in to change notification settings - Fork 159
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Accessibility and performance fixes #1228
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
✅ Deploy Preview for astro-www-2 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Safari in particular really struggled with the 64px blur over a large area. Because we’re already stretching a small image, less blur works almost as well and improves the performance a lot.
yanthomasdev
approved these changes
Aug 23, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing work @delucis! Took a while to go through it all, but it's a massive all-around improvement 💜.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a bit of an omnibus PR tackling many small paper cuts around accessibility and performance on astro.build. That makes it a little tricky to review, but here are the changes broken down by where they were made. For the most part nothing has changed visually, or if it has, in very tiny ways I would expect no-one to notice — I’ve marked these with 👁️.
Miscellaneous
h1
=>h3
, e.g. /privacy/ul > article
. These are nowul > li > article
, e.g. /press//db/
landing page/db/
to address incorrectaria-*
attributes (also reduces JS quite a bit because the custom element was managing a bunch of unnecessary attribute state)./db/
features section. (👁️ This is a visual change that does make the illustrations impacted slightly less subtle, but text contrast requirements still need to be met.)/db/
./db/
(e.g.<dl>
used without<dt>
and<dd>
)Homepage
div > section[role="tabpanel"]
for the tabbed interfaces on the landing page instead oful > li[role="tabpanel"]
. Thetabpanel
role removes the list-item semantics from anli
making it invalid to use inside aul
.loading="lazy"
on images below the fold on the landing page to improve page load performance.<img>
instead of a background image for the background of the homepage hero element to prioritise its loading and improve perceived page performance.<img>
elements.width
andheight
attributes in “ecosystem” themes tabs on homepage.Homepage headline numbers
* This is massively reduced thanks to lazy loading assets not needed for the initial view
† The visually complete metric matches when the hero background currently loads. While on a reasonably fast desktop connection LCP is not improved so much (still depends on font loading), the background image now loads way faster.
Web vitals numbers are from WebPageTest.com. Full runs:
Here are side-by-side loading comparison for the before/after runs:
A-96ff3b917c1ff2fc1f0666ceab33a9a8a8b99efa.mp4
A-82357d9bddce7a24b80465fb38362f7479f9d52a.mp4
Browser Test Checklist
I have tested this PR on at least three of the following browsers: