Skip to content

Commit

Permalink
Merge pull request #1914 from alphagov/attachment-heading-level
Browse files Browse the repository at this point in the history
Use heading level 3 for attachments
  • Loading branch information
maxgds authored Nov 18, 2020
2 parents 0f3eecb + 102854c commit 50b6466
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app/views/content_items/_attachments.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,16 @@
} do %>
<%= sanitize(legacy_pre_rendered_documents, {
attributes: %w(alt class href id src data-module data-track-category data-track-action data-track-label data-track-options data-details-track-click),
tags: %w(a details div h2 img p section span summary),
tags: %w(a details div h2 h3 img p section span summary),
}) %>
<% end %>
<% else %>
<% attachments.each do |attachment_id| %>
<div class="attachment">
<%= render 'govuk_publishing_components/components/attachment',
attachment: @content_item.attachment_details(attachment_id) %>
<%= render 'govuk_publishing_components/components/attachment', {
heading_level: 3,
attachment: @content_item.attachment_details(attachment_id)
} %>
</div>
<% end %>
<% end %>
Expand Down

0 comments on commit 50b6466

Please sign in to comment.