Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion components/Nav.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,16 @@ export function Nav({ t, locale }: { t: Dictionary; locale: Locale }) {
<ul className={styles.links}>
{NAV_IDS.map((id) => (
<li key={id}>
<a href={`#${id}`} className={`micro ${styles.link}`} data-active={active === id}>
{/* `location`, not `page`: this is a one-page site and the nav
tracks which SECTION is in view, which is exactly what
aria-current="location" means. "page" would claim a
navigation that never happens here. */}
<a
href={`#${id}`}
className={`micro ${styles.link}`}
data-active={active === id}
aria-current={active === id ? 'location' : undefined}
>
{t.nav[id]}
</a>
</li>
Expand Down