You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Renders a bare <a>: no class, no wrapper, no styling opinion — the same stance as <JImage>.
JLinkProps is a discriminated union over node | content | href, so "exactly one of" is a type error rather than prose, and the href branch requires children or aria-label. An anchor with no accessible name is a WCAG 2.4.4 failure, and it is the real analogue of JImage's required alt.
whenUnresolved: "children" (default) renders the children unwrapped, "none" renders nothing. Not named fallback — JImage's fallback is a static-asset URL, and the two components are presented as a matched pair.
Never an <a> without href. That is what luxe's CTA produces today, and its test asserts the resulting <a>Broken</a>.
Emits aria-current="page" from state.isCurrent. No LinkState key reaches the DOM — assert this in a unit test, so a field added later cannot leak.
Arbitrary children, so <JLink node={target}><JImage node={cover} alt={alt} /></JLink> works — core's jnt:imageReferenceLink family, which Digitall ships instances of.
All other anchor attributes pass through untouched (onClick, aria-label, hreflang, lang, download).
Importing it from a client bundle already fails at build time (vite-plugin/src/index.ts:214-221, :316-321). Make sure the error names JLink's server-only status and points at getLinkProps + <a {...anchor}>.
Naming: JLink, for the same reason <JImage> is not <Image>.
Part of #749. The component over
getLinkProps. Server-only.<a>: no class, no wrapper, no styling opinion — the same stance as<JImage>.JLinkPropsis a discriminated union overnode | content | href, so "exactly one of" is a type error rather than prose, and thehrefbranch requireschildrenoraria-label. An anchor with no accessible name is a WCAG 2.4.4 failure, and it is the real analogue ofJImage's requiredalt.whenUnresolved:"children"(default) renders the children unwrapped,"none"renders nothing. Not namedfallback—JImage'sfallbackis a static-asset URL, and the two components are presented as a matched pair.<a>withouthref. That is what luxe's CTA produces today, and its test asserts the resulting<a>Broken</a>.aria-current="page"fromstate.isCurrent. NoLinkStatekey reaches the DOM — assert this in a unit test, so a field added later cannot leak.<JLink node={target}><JImage node={cover} alt={alt} /></JLink>works — core'sjnt:imageReferenceLinkfamily, which Digitall ships instances of.onClick,aria-label,hreflang,lang,download).vite-plugin/src/index.ts:214-221,:316-321). Make sure the error names JLink's server-only status and points atgetLinkProps+<a {...anchor}>.JLink, for the same reason<JImage>is not<Image>.First pass in #751.