1. Collections Component Guide
  2. List
  3. Unordered list with aria-label
List example

Unordered list with aria-label

A list with an aria-label

How it looks (preview)

  • Tony’s Chocolonely
  • Cherry Ripe
  • Snickers
  • Chomp
  • Penguin
  • Boost

How to call this example

<%= render "govuk_publishing_components/components/list", {
  aria_label: "A list of delicious chocolate bars.",
  items: [
    sanitize("Tony&rsquo;s Chocolonely"),
    sanitize("<a href=\"https://en.wikipedia.org/wiki/Cherry_Ripe_(chocolate_bar)\" rel=\"noopener\" class=\"govuk-link\">Cherry Ripe</a>"),
    "Snickers",
    "Chomp",
    "Penguin",
    "Boost"
  ]
} %>