Contents list example
With custom aria label
An aria-label
string should be used to contextualise the navigation for assistive technology. Defaults to Contents
if aria-label
is not passed.
How it looks (preview)
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"
}
]
} %>