1. Government Frontend Component Guide
  2. Contents list
  3. Aria label
Contents list example

Aria label

An aria-label string can be used to contextualise the navigation for assistive technology.

How it looks

How to call this example

<%= render "govuk_publishing_components/components/contents_list", {
  aria_label: "Pages in this guide",
  contents: [
    {
      href: "#first-thing",
      text: "First"
    },
    {
      href: "#two",
      text: "Second",
      active: true
    },
    {
      href: "#third-thing",
      text: "Third thing"
    }
  ]
} %>