diff --git a/app/views/components/_result_sections.html.erb b/app/views/components/_result_sections.html.erb
index fd9bff69253..74b75ee7027 100644
--- a/app/views/components/_result_sections.html.erb
+++ b/app/views/components/_result_sections.html.erb
@@ -7,8 +7,11 @@
if !topics.any?
raise ArgumentError, "The result section component requires topics data"
end
+
+ component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
+ component_helper.add_class("app-c-result-sections")
%>
-
+<%= tag.div(**component_helper.all_attributes) do %>
<% topics.each do |topic, results| %>
<%= topic %>
@@ -22,4 +25,4 @@
<% end %>
<% end %>
-
+<% end %>
diff --git a/app/views/components/docs/result_sections.yml b/app/views/components/docs/result_sections.yml
index 68c1497aa78..83c28558fc1 100644
--- a/app/views/components/docs/result_sections.yml
+++ b/app/views/components/docs/result_sections.yml
@@ -2,32 +2,34 @@ name: Result section
description: Groups a set of results items under a common title
shared_accessibility_criteria:
- link
+uses_component_wrapper_helper: true
examples:
default:
data:
- title: Business tax
- results:
+ topics:
+ business_tax:
- title: "Register for Corporation Tax"
url: "/corporation-tax"
description: "You need to register for corporation tax within 3 months of starting to do business, if you haven’t done so already."
with-multiple-items:
data:
- title: Business tax
- results:
- - title: "Register for Corporation Tax"
- url: "/corporation-tax"
- description: "You need to register for corporation tax within 3 months of starting to do business, if you haven’t done so already."
- - title: "Register for VAT"
- url: "/vat-registration"
- description: "You need to register your business for VAT if your VAT taxable turnover is more than £85,000."
+ topics:
+ business_tax:
+ - title: "Register for Corporation Tax"
+ url: "/corporation-tax"
+ description: "You need to register for corporation tax within 3 months of starting to do business, if you haven’t done so already."
+ - title: "Register for VAT"
+ url: "/vat-registration"
+ description: "You need to register your business for VAT if your VAT taxable turnover is more than £85,000."
with-multiple-highlighted-items:
data:
- title: Business tax
- highlighted: true
- results:
- - title: "Register for Corporation Tax"
- url: "/corporation-tax"
- description: "You need to register for corporation tax within 3 months of starting to do business, if you haven’t done so already."
- - title: "Register for VAT"
- url: "/vat-registration"
- description: "You need to register your business for VAT if your VAT taxable turnover is more than £85,000."
+ topics:
+ business_tax:
+ - title: "Register for Corporation Tax"
+ url: "/corporation-tax"
+ description: "You need to register for corporation tax within 3 months of starting to do business, if you haven’t done so already."
+ highlighted: true
+ - title: "Register for VAT"
+ url: "/vat-registration"
+ description: "You need to register your business for VAT if your VAT taxable turnover is more than £85,000."
+ highlighted: true