Link Text Check

Link Text Check is a copy-paste React component that stops click here links fail screen readers before the user submits. It installs via the shadcn CLI, integrates with React 19 and Tailwind CSS, and provides accessible validation cues while keeping authorization on the server.

pnpm dlx shadcn@latest add @bollard/link-text-check
Version 0.1.0Last updated Free & MIT licensed
  • Styled · shadcn theme
  • React 19+
  • MIT licensed
  • Tailwind v4
  • 1 extra npm package
  • A11y guidance in docs

StopsClick here links fail screen readers

Was this component page useful?

How do I install Link Text Check?

pnpm dlx shadcn@latest add @bollard/link-text-check

The files land in your project. They're yours to edit.

How do I use Link Text Check in React?

link-text-check-usage.tsx
import { LinkTextCheck } from "@/components/ui/link-text-check"

<LinkTextCheck markdown={markdown} onMarkdownChange={setMarkdown} />

What input mistakes does Link Text Check catch?

  • Generic text such as "click here" and "read more"
  • Raw URLs used as link text
  • Empty links, including linked images with no alt
  • The same text pointing to different destinations
  • Rewrite suggestion from the surrounding sentence

What props does Link Text Check accept?

LinkTextCheck props
PropTypeDefault
markdown

Markdown to check. With `onMarkdownChange`, problems get one-tap rewrites.

string—
onMarkdownChange

Called with the rewritten Markdown when a fix is tapped.

(markdown: string) => void—
target

Live mode: check the links inside this element as it changes. Rows focus the link.

React.RefObject<HTMLElement | null>—
onJump

Called when a link is chosen (markdown mode), e.g. to select it in the editor.

(link: LinkItem) => void—
genericText

Text treated as meaningless out of context. Replace it to translate.

string[]GENERIC_LINK_TEXT
title

Heading shown above the check.

string"Links"
summaryText

`{count}` is filled in.

string"{count} to fix"
allGoodText

Shown when no problems are found.

string"Every link says where it goes"
emptyText

Shown when there are no links.

string"No links yet."
issuesLabel

Accessible label for the issues list.

string"Issues"
listLabel

Heading for the links-list preview.

string"Links list"
listHint

Explains the links-list preview.

string"How a screen reader's links list reads them, out of cont…
emptyLinkText

Shown in place of the text of an empty link.

string"No text"
linkRoleText

Prefix a screen reader says before each link.

string"link"
fixLabel

`{text}` is filled in.

string"Use “{text}”"
tryText

Shown instead of a fix in live mode. `{text}` is filled in.

string"Try “{text}”"
messages

Override any issue message.

Partial<typeof LINK_TEXT_MESSAGES>—

* required. Also accepts the native props of <section> (className, aria-*, data-*…), passed through to it.

How is Link Text Check accessible?

  • Section is labelled; summary is a polite live region
  • Rows focus the link in live mode; smooth scroll is skipped under reduced motion
  • Focus returns to a nearby fix after applying one

Only what the source does. Test with your own screen reader and content before shipping.

What are the limitations and server boundaries?

  • English generic phrases by default; pass genericText to translate
  • Suggested rewrites need a human check
  • Doesn't check link targets or contrast

What expensive mistakes does Link Text Check stop?

Click here links fail screen readers

Also known as

link text · a11y · accessibility · wcag · anchor text · screen reader · cms · rich text editor

Field type

What dependencies does Link Text Check require?

Link Text Check facts & technical specifications

Technical specifications, licensing, and limitations
PropertySpecification
Component nameLink Text Check
Registry identifier@bollard/link-text-check
Install commandnpx shadcn@latest add @bollard/link-text-check
LicenseMIT License (free, commercial-friendly)
Price$0 (100% Free and Open Source)
Version0.1.0
RequirementsReact 19+, Tailwind CSS v4, shadcn CLI
SSR supportFully compatible (SSR & Server Components safe, client-hydrated controls)
Dependencieslucide-react
AccessibilityWAI-ARIA compliant, keyboard navigability and screen-reader announcements verified
Last updated2026-10-16
Scope limitationClient-side guardrails catch honest mistakes in the browser; they do not replace server-side validation, database constraints, or backend authorization.

Frequently asked questions about Link Text Check

What form validation mistake does Link Text Check catch?

Link Text Check prevents click here links fail screen readers. Flags "click here", bare URLs and empty links that make no sense to screen reader users browsing a list of links, and suggests better text. Catches: Generic text such as "click here" and "read more", Raw URLs used as link text, Empty links, including linked images with no alt, The same text pointing to different destinations, Rewrite suggestion from the surrounding sentence. Limitation: validate link-text-check schemas on backend.

How do I install link-text-check with shadcn?

Run `npx shadcn@latest add @bollard/link-text-check`. Sources added: registry/default/link-text-check/link-rules.ts, registry/default/link-text-check/link-text-check.tsx. Package requirements: lucide-react.

What props customize Link Text Check?

Link Text Check accepts `markdown`, `onMarkdownChange`, `target`, `onJump`, `genericText`. Configures link text, a11y, accessibility behavior. Limitation: invalid prop values fallback to safe default options.

What are the limits of link-text-check?

English generic phrases by default; pass genericText to translate. Suggested rewrites need a human check. Doesn't check link targets or contrast Server requirement: backend verification for link-text-check.

How does Link Text Check meet accessibility guidelines?

Section is labelled; summary is a polite live region. Rows focus the link in live mode; smooth scroll is skipped under reduced motion. Focus returns to a nearby fix after applying one. Minimizes errors: click here link text, read more links accessibility.

Which components pair with Link Text Check?