The link system with four cues on every link and one more per kind, named by data-link.
<div class="link-scroll" role="region" aria-label="A text link in each state" tabindex="0">
<table class="link-states">
<caption class="cap-sr-only">A text link in each state</caption>
<thead>
<tr><th scope="col">At rest</th><th scope="col">Hover</th><th scope="col">Pressed</th><th scope="col">Visited</th><th scope="col">Focus</th></tr>
</thead>
<tbody>
<tr>
<td><a href="/writing/field-notes">Field notes</a></td>
<td><a href="/writing/field-notes">Field notes</a></td>
<td><a href="/writing/field-notes">Field notes</a></td>
<td><a href="/writing/field-notes">Field notes</a></td>
<td><a href="/writing/field-notes">Field notes</a></td>
</tr>
</tbody>
</table>
</div>
<p>In a sentence: the <a href="/writing/field-day">field day notes</a> sit beside the <a href="/writing/spring-survey">spring garden survey</a>, and a long link wraps with its tint on each line: <a href="/writing/why-field-notebooks-keep-coming-back">why field notebooks keep coming back after a century of being forgotten</a>.</p>
<ul id="link-fallbacks">
<li>Another site: <a href="https://example.net/" rel="external">Example Net</a>, and a new tab: <a href="https://example.org/archive" target="_blank">the archive</a></li>
<li>A download: <a href="/files/survey.zip" download>the survey data</a>, and a file by its ending: <a href="/files/annual-report.pdf">the annual report</a></li>
<li>A place on this page, in running text: <a href="#results">the results</a></li>
<li>Mail and phone: <a href="mailto:team@example.com">team@example.com</a>, <a href="tel:+15550100">555 0100</a></li>
<li>A footnote as GFM writes it: a claim<sup><a href="#user-content-fn-1" id="user-content-fnref-1" data-footnote-ref aria-describedby="link-notes">2</a></sup>, and the way back: <a href="#user-content-fnref-1" data-footnote-backref aria-label="Back to reference 2">↩</a></li>
</ul>
A post: every kind in running text
<main class="specimen-page link-post">
<article data-context="prose">
<h1>Why field notebooks keep coming back</h1>
<p>Filed under <a href="/tags/survey" data-link="tag">survey</a> <a href="/tags/history" data-link="tag">history</a></p>
<p>In 1917 a schoolteacher began a notebook of every bird in the town square, and by the 1930s whole towns kept them across Europe and America.<sup><a href="#fn-1" id="fnref-1" class="cap-footnote-ref" aria-describedby="post-notes">1</a></sup> Spreadsheets pushed the habit aside everywhere but a few villages, where the <a href="https://archive.example.net" data-link="away">Example Co archive<span class="cap-sr-only"> (opens another site)</span></a> kept collecting them. The <a href="/writing/sampling" data-link="xref">sampling</a> essay covers the method; this one is about the people.</p>
<p>We read every notebook we could find (see <a href="#methods" data-link="jump">Methods</a>), and the charts of the counts are on <a href="https://germomics.com" data-link="family" data-site="germomics">Germomics</a>. The full protocol is <a href="/files/survey-protocol.pdf" data-link="file">the survey protocol</a> <span class="cap-link-meta">PDF, 2 MB</span>, and the review we leaned on is <a href="https://doi.org/10.5555/12345678" data-link="address" rel="external">doi.org/10.5555/12345678<span class="cap-sr-only"> (opens another site)</span></a>.</p>
<p>There is a shorter version <a href="/es/writing/field-notebooks" hreflang="es" data-link="lang">in Spanish</a> <span class="cap-link-meta" lang="es">Español</span>. Questions go to <a href="mailto:editor@example.com" data-link="email">the editor</a>, and the office answers the phone at <a href="tel:+15550100" data-link="phone">555 0100</a>.</p>
<h2 id="methods"><a href="#methods">Methods</a></h2>
<p>We searched <a href="https://example.org/" data-link="away">Example Org<span class="cap-sr-only"> (opens another site)</span></a> for every notebook since 1990, and read the <a href="/writing/spring-survey">spring garden survey</a> again for the field sites.</p>
<p><a href="/writing/field-notebooks-part-two" data-link="next">Part two: the notebooks</a></p>
<section data-footnotes>
<h2 id="post-notes" class="cap-sr-only">Footnotes</h2>
<ol>
<li id="fn-1"><p>The teacher's own account, 1917.
<a href="#fnref-1" data-footnote-backref aria-label="Back to reference 1">↩</a></p></li>
</ol>
</section>
</article>
</main>
True when path is pattern or sits under it, segment by segment and ignoring case, as the router matches. A pattern segment ":name" or "*" stands for any one segment: underPath("/b/handbook/export/epub", "/b/:project/export") is true, underPath("/administer", "/admin") false.
mayPrefetch
(link: PrefetchLink): boolean
Whether the link may prefetch. Never for a link that loads a whole document (reloadDocument), opens elsewhere (a target other than _self), downloads, leaves the app, points at a file, or goes under NEVER_PREFETCH or the app's exclude; /admin only from a page already under /admin.
Reaches the link; focus prefetches it in a React Router app, as hover does
Enter
Follows it
Every mark is hidden: a glyph is written content: "↗" / "", an icon has no content and an img has alt="". The words are in the markup:
away: <span class="cap-sr-only"> (opens another site)</span> inside the link. A fallback with no attribute speaks it as the glyph's alt text instead (", opens another site", or ", opens in a new tab" for target="_blank").
file and lang: the meta is the words, read after the link.
email, phone, jump, family, xref, address, next, title, tag: the link text says it.
Footnotes: GFM's aria-describedby on the reference and aria-label="Back to reference 1" on the way back.
Every link is a real <a href>, announced as a link, opening in a new tab with the browser's own keys.
Marks are hidden from assistive technology and their words are in the contract (above). The sweep checks that every text link has the base cues, that each kind shows its mark, that marks are hidden, that visited and pressed differ from rest, and forced colors.
Text links are inline in a sentence (WCAG 2.5.8's inline exception); a tag pill and a footnote's way back reach the target size.
NavLink sets aria-current="page" on the link to the current route (React Router's own).
Last checked by hand: not yet. Automated: the sweep (test/sweep.spec.ts), the palette check, and test/unit/link.test.mjs (the prefetch rule, and the family icons against FAMILY_LINK_SITES).