From 737d3f6b18c76a8b673cb3262e839a78daa1da0c Mon Sep 17 00:00:00 2001 From: Dana Cotoran Date: Wed, 18 Nov 2020 10:07:21 +0000 Subject: [PATCH 1/3] Use heading level 3 for attachments --- app/views/content_items/_attachments.html.erb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/views/content_items/_attachments.html.erb b/app/views/content_items/_attachments.html.erb index 61b1f1cce..765d2342a 100644 --- a/app/views/content_items/_attachments.html.erb +++ b/app/views/content_items/_attachments.html.erb @@ -16,8 +16,10 @@ <% else %> <% attachments.each do |attachment_id| %>
- <%= 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) + } %>
<% end %> <% end %> From c1ab7edb27884b14a0c95747260eb18d9b74966c Mon Sep 17 00:00:00 2001 From: Dana Cotoran Date: Wed, 18 Nov 2020 10:54:50 +0000 Subject: [PATCH 2/3] Update legacy_pre_rendered_documents tags --- app/views/content_items/_attachments.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/content_items/_attachments.html.erb b/app/views/content_items/_attachments.html.erb index 765d2342a..08459d722 100644 --- a/app/views/content_items/_attachments.html.erb +++ b/app/views/content_items/_attachments.html.erb @@ -10,7 +10,7 @@ } 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 h3 img p section span summary), }) %> <% end %> <% else %> From 102854cf281fbe88728d37943711d08e0cbd5f70 Mon Sep 17 00:00:00 2001 From: Dana Cotoran Date: Wed, 18 Nov 2020 11:11:16 +0000 Subject: [PATCH 3/3] Allow h2 to maintain backward compatibility with current content api --- app/views/content_items/_attachments.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/content_items/_attachments.html.erb b/app/views/content_items/_attachments.html.erb index 08459d722..851bfff45 100644 --- a/app/views/content_items/_attachments.html.erb +++ b/app/views/content_items/_attachments.html.erb @@ -10,7 +10,7 @@ } 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 h3 img p section span summary), + tags: %w(a details div h2 h3 img p section span summary), }) %> <% end %> <% else %>