How to build an accessible InlineCitation in React

A real link whose accessible name starts with the visible number and includes the source title ("Source 1: Refund policy"), so it is meaningful without the hover card, which also opens on keyboard focus. Refused URLs keep the number and name but are not links

When to use a InlineCitation

When not to use it

Keyboard interactions

Role link, verified at WCAG 2.2-AA.

Common mistakes

Avoid: Numbering citations independently of the Sources list

Prefer: Use the source’s position in Sources as `index`

A reader matches "2" in the text to row 2 of the list; mismatched numbers point at the wrong source

Example

<p>
  Refunds are available for 30 days.
  <InlineCitation index={1} source={{ title: 'Refund policy', url: 'https://example.com/refunds' }} />
</p>

See the full InlineCitation reference →