Skip to content

Commit

Permalink
Update how contents list is called
Browse files Browse the repository at this point in the history
- changes in the gem mean that the `aria_label` option for the contents list component has been replaced with the `aria` option (passing a hash of aria options)
  • Loading branch information
andysellick committed Mar 8, 2023
1 parent 60d8db6 commit 524ff49
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/views/content_items/guide.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
href: "#guide-contents"
} %>
<aside class="part-navigation-container" role="complementary">
<%= render "govuk_publishing_components/components/contents_list", aria_label: t("guide.pages_in_guide"), contents: @content_item.part_link_elements, underline_links: true %>
<%= render "govuk_publishing_components/components/contents_list", aria: { label: t("guide.pages_in_guide") }, contents: @content_item.part_link_elements, underline_links: true %>
</aside>
<% end %>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/content_items/guide_single.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

<% if @content_item.show_guide_navigation? %>
<aside class="part-navigation-container" role="complementary">
<%= render "govuk_publishing_components/components/contents_list", aria_label: t("guide.pages_in_guide"), contents: @content_item.part_link_elements, underline_links: true %>
<%= render "govuk_publishing_components/components/contents_list", aria: { label: t("guide.pages_in_guide") }, contents: @content_item.part_link_elements, underline_links: true %>
</aside>
<% end %>
</div>
Expand Down
2 changes: 1 addition & 1 deletion app/views/content_items/manual_section.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
} %>

<%= render "govuk_publishing_components/components/contents_list", {
aria_label: t("manuals.pages_in_manual_section"), contents: @content_item.contents, underline_links: true
aria: { label: t("manuals.pages_in_manual_section") }, contents: @content_item.contents, underline_links: true
} %>

<div class="govuk-grid-row">
Expand Down
2 changes: 1 addition & 1 deletion app/views/content_items/travel_advice.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<%= render 'govuk_publishing_components/components/title', @content_item.title_and_context %>

<aside class="part-navigation-container" role="complementary">
<%= render "govuk_publishing_components/components/contents_list", aria_label: t("travel_advice.pages"), contents: @content_item.part_link_elements, underline_links: true %>
<%= render "govuk_publishing_components/components/contents_list", aria: { label: t("travel_advice.pages") }, contents: @content_item.part_link_elements, underline_links: true %>

<%= render 'govuk_publishing_components/components/subscription_links',
email_signup_link: @content_item.email_signup_link,
Expand Down

0 comments on commit 524ff49

Please sign in to comment.