From CSS Tricks: 5 Accessibility Quick Wins You Can Implement Today.
I like articles about accessibility in this format, how-tos of practical examples you see on almost every website. Heydon Pickering’s Inclusive Components was the first place I saw this, but the site had only a few examples and ended up being short-lived.
I went to implement two of the 5 “quick wins” above that were relevant to this site:
aria-current
page. I was doing a gross hack with the window.location
to parse out the current page before, and cleaned that up with Next’s useRouter.<html>
tag in Next is, like most JavaScript frameworks, somewhat unintuitive. This post shows one way: How to set the HTML lang attribute in Next.js? but I found out it doesn’t work with next export
when generating a static site. I then realized I had already done it the other way, using a custom Document.