Skip to content

perf/a11y: conditional Calendly load, shimmer viewport pause, skip link, ARIA tabs, reduced-motion fixes#65

Merged
jaypatrick merged 2 commits into
mainfrom
copilot/improve-performance-and-ux
May 30, 2026
Merged

perf/a11y: conditional Calendly load, shimmer viewport pause, skip link, ARIA tabs, reduced-motion fixes#65
jaypatrick merged 2 commits into
mainfrom
copilot/improve-performance-and-ux

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 29, 2026

Several independent issues across performance, accessibility, and motion consistency — none breaking, but collectively worth addressing.

Performance

  • Calendly CSS/JS were loaded on every page — now gated to pathname === '/'. Eliminates an external stylesheet + script fetch on /blog, /privacy, 404, etc.
  • preconnect for assets.calendly.com added alongside the conditional load.
  • Shimmer viewport pause was fully wired but never activated — the IntersectionObserver tracked .shimmer-in-view correctly, but data-shimmer-viewport-pause="true" was never set on <html>, so the CSS gate (html[data-shimmer-viewport-pause="true"] .iridescent:not(.shimmer-in-view)::after { animation-play-state: paused }) never fired. Now set via requestAnimationFrame after initial IO callbacks to avoid a flash-of-paused-shimmer on visible tiles.

Accessibility

  • Skip-to-main-content link — visually hidden <a href="#main-content" class="skip-link"> that surfaces on focus; styled with Phosphor tokens.
  • Services tabs missing keyboard navigationrole="tab" markup was correct but no keydown handler existed. Added ArrowLeft, ArrowRight, Home, End with focus management per WAI-ARIA tabs pattern.
  • Contact form errors not programmatically connected — error <p> elements now have stable IDs (contact-name-error, etc.) and inputs have matching aria-describedby, complementing the existing role="alert".

Motion consistency

  • Portfolio .clients-track marquee had no prefers-reduced-motion override — added alongside the existing signal-lock-sweep override in the same media block.
  • Hero animate-bounce (scroll indicator) had no reduced-motion guard — added to the global @media (prefers-reduced-motion: reduce) block in global.css.

UX

  • RSS skeleton count was hardcoded to 3 regardless of maxItems prop (default 5) — now uses maxItems so skeleton layout matches the loaded grid.

- Conditional Calendly CSS/JS load: only included on homepage,
  eliminating ~80KB of external assets on /blog, /privacy, etc.
- Add preconnect hint for assets.calendly.com (homepage only)
- Enable shimmer viewport pause: set data-shimmer-viewport-pause
  after initial IntersectionObserver fires so off-screen iridescent
  tiles pause their GPU animation
- Add skip-to-main-content link for keyboard/screen-reader users
  with Phosphor-styled CSS in global.css
- Services tabs: add ARIA-compliant keyboard navigation (ArrowLeft,
  ArrowRight, Home, End) per WAI-ARIA tabs pattern
- RssFeed: skeleton loader now renders maxItems cards instead of a
  hardcoded 3, matching the real loaded count
- Portfolio marquee: pause animation for prefers-reduced-motion users
- Hero scroll indicator: suppress animate-bounce for reduced motion
- Contact form: connect field error messages via aria-describedby
  for improved screen reader announcement
Copilot AI changed the title perf/ux: performance, accessibility & animation improvements perf/a11y: conditional Calendly load, shimmer viewport pause, skip link, ARIA tabs, reduced-motion fixes May 29, 2026
Copilot AI requested a review from jaypatrick May 29, 2026 06:32
@jaypatrick jaypatrick added documentation Improvements or additions to documentation enhancement New feature or request labels May 29, 2026
@jaypatrick jaypatrick added this to the launch milestone May 29, 2026
@jaypatrick jaypatrick marked this pull request as ready for review May 29, 2026 07:05
Copilot AI review requested due to automatic review settings May 29, 2026 07:05
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves site performance and accessibility across the Astro layout and several Svelte sections, while tightening reduced-motion behavior and fixing a small UX mismatch in the RSS skeleton loader.

Changes:

  • Conditionally loads Calendly assets only on the homepage, adds a Calendly preconnect, and enables the shimmer viewport-pause gate.
  • Adds a global skip-to-content link + styling, improves Services tab keyboard navigation, and connects Contact form errors to inputs via aria-describedby.
  • Adds reduced-motion overrides for the Hero bounce indicator and Portfolio marquee; aligns RSS skeleton count with maxItems.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/styles/global.css Adds reduced-motion suppression for .animate-bounce and introduces .skip-link styling.
src/layouts/BaseLayout.astro Gates Calendly asset loading to /, adds skip link markup, and activates shimmer viewport pause via data-shimmer-viewport-pause.
src/components/sections/Services.svelte Adds WAI-ARIA-style keyboard navigation for the services tablist.
src/components/sections/RssFeed.svelte Uses maxItems to determine skeleton placeholder count.
src/components/sections/Portfolio.svelte Disables the clients marquee animation under prefers-reduced-motion.
src/components/sections/Contact.svelte Links field-level error text to inputs via stable IDs + aria-describedby.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/layouts/BaseLayout.astro Outdated
Comment thread src/components/sections/Services.svelte
@jaypatrick jaypatrick merged commit 8e68fbd into main May 30, 2026
4 checks passed
@jaypatrick jaypatrick deleted the copilot/improve-performance-and-ux branch May 30, 2026 02:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants