Skip to content
Open
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions .Jules/palette.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## 2025-05-10 - Keyboard Navigation Enhancements
**Learning:** Found that the application lacked basic keyboard accessibility features. Specifically, there was no "Skip to content" link for screen reader and keyboard users to bypass the navigation, and many interactive elements (like `.btn` which had `outline: none;`) lacked visible focus indicators, making it hard to track focus via keyboard.
**Action:** Always ensure that global focus states (e.g., using `:focus-visible`) are present to provide visual feedback for interactive elements. Incorporate a visually hidden (until focused) skip link at the top of the DOM structure that anchors to the main content area (`<main>`).
6 changes: 5 additions & 1 deletion src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ function App() {

return (
<>
<a href="#main-content" className="skip-to-content">
Skip to content
</a>

{/* UI overlays */}
<div id="cursor-dot" />
<div id="cursor-ring" />
Expand All @@ -146,7 +150,7 @@ function App() {

{/* App */}
<Navbar />
<main>
<main id="main-content">
<Hero />
<About />
<Skills />
Expand Down
30 changes: 30 additions & 0 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,13 @@ body {
/* ── SELECTION ── */
::selection { background: hsla(185, 100%, 52%, 0.3); color: var(--text-primary); }

/* ── FOCUS STATES ── */
:focus-visible {
outline: 2px solid var(--accent-cyan);
outline-offset: 4px;
border-radius: 4px;
}

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4, h5, h6 {
font-family: var(--font-display);
Expand All @@ -146,6 +153,29 @@ h1, h2, h3, h4, h5, h6 {
a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

/* ── SKIP TO CONTENT ── */
.skip-to-content {
position: absolute;
top: -100px;
left: 0;
padding: 1rem;
background: var(--bg-card);
color: var(--accent-cyan);
z-index: 10000;
transition: top 0.3s ease;
font-family: var(--font-mono);
font-weight: 600;
text-decoration: none;
border-bottom-right-radius: var(--radius-md);
border: 1px solid var(--glass-border);
box-shadow: var(--glass-shadow);
}

.skip-to-content:focus {
top: 0;
outline: 2px solid var(--accent-violet);
}

/* ── UTILITIES ── */
.container {
max-width: 1200px;
Expand Down