1. Collections Component Guide
  2. Details
  3. With aria attributes
Details example

With aria attributes

Aria attributes can be applied to the summary element of the component.

How it looks (preview)

Attorney General's office

Works with 2 agencies and public bodies
  • Department 1
  • Department 2

How to call this example

<div>
  <p class="govuk-body">Attorney General's office</p>
  <%= render "govuk_publishing_components/components/details", {
  title: "Works with 2 agencies and public bodies",
  summary_aria_attributes: {
    label: "Attorney General's office"
  }
} do %>
  <ul>
  <li>Department 1</li>
  <li>Department 2</li>
</ul>
<% end %>
</div>