Skip to main content
Components

Attachment

The attachment component allows users to download documents and presents information about a document. It also allows users to request an accessible format.

When to use this component

This component is exclusively used on guidance pages with document attachments

How it works

This component displays a link to a document that is attached to GOV.UK content along with a thumbnail and relevant file data (title of the document, format type, file size, link to view online, and request accessible format details).

It is intended to be rendered in Govspeak and as an attachment ‘preview’ in Content Publisher. It is not as rich in features as the attachment rendering provided by Whitehall, it lacks support for multiple languages, CSV previews and publication fields.

View this component and all its variations in the Component Guide (open in a new tab).

Accessibility criteria

The thumbnail image, and the link wrapping it, must not focusable or shown to screenreaders.

Links in the component must:

  • accept focus
  • be focusable with a keyboard
  • be usable with a keyboard
  • indicate when they have focus
  • change in appearance when touched (in the touch-down state)
  • change in appearance when hovered
  • be usable with touch
  • be usable with voice commands
  • have visible text
  • have meaningful text

Considerations and criteria taken from the Component Guide (open in a new tab).

An existing issue with this component

Audit of all attachment component variations

How to report an issue

If you happen to come across an issue:

  1. Report it on Github (opens in a new tab).
  2. Once the issue has been added, update this document by adding the title and Github Issue's link.
  3. Give yourself a high-five.

Help improve this component

To help make sure that this page is useful, relevant and up to date, submit a GitHub issue (opens in a new tab) with your proposed updates.