Skip to content

Sync | Make buttons and links clickable without affecting page speed performance and SEO#387

Open
sc-krishanthakumara wants to merge 7 commits intoSitecore:mainfrom
sc-krishanthakumara:fix/SCB-781-update-content
Open

Sync | Make buttons and links clickable without affecting page speed performance and SEO#387
sc-krishanthakumara wants to merge 7 commits intoSitecore:mainfrom
sc-krishanthakumara:fix/SCB-781-update-content

Conversation

@sc-krishanthakumara
Copy link
Contributor

Description / Motivation

Links and buttons across the Sync (click-click-launch) site were non-functional due to placeholder url="#" values in SYNC branch item serialization files. These # values were being normalised to http://# by the Sitecore Content SDK at render time, causing clicks to navigate to a blank page. A previous workaround in the component layer made links unclickable entirely, which was also incorrect.

This PR resolves the issue cleanly across three areas:

1. SYNC YML data — replace all # placeholder URLs with meaningful paths

  • Hero "Learn more" links → /Speakers
  • Hero "Buy" links → /Speakers/Heritage-30 and /Speakers/Heritage-50 respectively
  • Navigation and utility links (footer secondary links, header sub-nav, accordion CTAs) with no dedicated page yet → /
  • Applies across 25 YML files in the click-click-launch SYNC branch items

2. Component layer — remove placeholder href workaround logic

  • Removed isPlaceholderHref helper and HeroLink wrapper from HeroST.tsx, HeaderST.tsx, MultiPromo.tsx, AccordionBlock.tsx, and MiniCart.tsx
  • All link fields now render directly via ContentSdkLink, consistent with the original backup-chathumika branch approach
  • The MiniCart cart icon trigger renders as a semantic <button> since its action is toggling a panel, not navigation

3. Accessibility — unique aria-label on repeated "Learn more" links

  • Repeated "Learn more" button text is kept as-is visually
  • Each link now carries a unique aria-label derived from its section context (e.g. aria-label="Monarch II details", aria-label="Damian Turner artist series")
  • Resolves Lighthouse accessibility warning for duplicate link text with no UI or copy changes

The fix avoids any client-side URL manipulation, extra re-renders, or JavaScript-based navigation overrides that could affect Page Speed Insights scores. Links are standard anchor elements pointing to real paths with no PSI or Core Web Vitals impact.

Note on # anchors and PSI: Adding # without navigation is achievable via e.preventDefault(), but requires JavaScript on every click and can introduce Lighthouse warnings for links with no meaningful href. Replacing with real

@vercel
Copy link

vercel bot commented Mar 17, 2026

@sc-krishanthakumara is attempting to deploy a commit to the Sitecore JSS Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants