From f21ef39b14720dcb2f36907af0b401598bf82069 Mon Sep 17 00:00:00 2001 From: James Gunn Date: Wed, 6 Mar 2024 17:36:46 +0000 Subject: [PATCH] Update to govuk-frontend 5.1.0 --- Directory.Build.props | 2 +- .../HtmlGeneration/ComponentGenerator.Accordion.cs | 1 - .../TagHelpers/AccordionTagHelperTests.cs | 8 ++++---- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/Directory.Build.props b/Directory.Build.props index a47e7257..3684612e 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -4,7 +4,7 @@ true $([MSBuild]::EnsureTrailingSlash('$(MSBuildThisFileDirectory)')) enable - 5.0.0 + 5.1.0 <_NpmLibDirectory>$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'lib')) <_NpmLibVersionFile>$([System.IO.Path]::Combine('$(_NpmLibDirectory)', 'version.txt')) diff --git a/src/GovUk.Frontend.AspNetCore/HtmlGeneration/ComponentGenerator.Accordion.cs b/src/GovUk.Frontend.AspNetCore/HtmlGeneration/ComponentGenerator.Accordion.cs index 1e2b5b57..3b06b83e 100644 --- a/src/GovUk.Frontend.AspNetCore/HtmlGeneration/ComponentGenerator.Accordion.cs +++ b/src/GovUk.Frontend.AspNetCore/HtmlGeneration/ComponentGenerator.Accordion.cs @@ -140,7 +140,6 @@ public TagBuilder GenerateAccordion( var contentDiv = new TagBuilder("div"); contentDiv.MergeCssClass("govuk-accordion__section-content"); contentDiv.Attributes.Add("id", contentId); - contentDiv.Attributes.Add("aria-labelledby", headingId); contentDiv.MergeOptionalAttributes(item.ContentAttributes); contentDiv.InnerHtml.AppendHtml(item.Content); section.InnerHtml.AppendHtml(contentDiv); diff --git a/test/GovUk.Frontend.AspNetCore.Tests/TagHelpers/AccordionTagHelperTests.cs b/test/GovUk.Frontend.AspNetCore.Tests/TagHelpers/AccordionTagHelperTests.cs index a3ce36be..0efd9e90 100644 --- a/test/GovUk.Frontend.AspNetCore.Tests/TagHelpers/AccordionTagHelperTests.cs +++ b/test/GovUk.Frontend.AspNetCore.Tests/TagHelpers/AccordionTagHelperTests.cs @@ -67,7 +67,7 @@ public async Task ProcessAsync_GeneratesExpectedOutput()
First summary
-
+
First content
@@ -77,7 +77,7 @@ First content Second heading -
+
First content
@@ -146,7 +146,7 @@ public async Task ProcessAsync_WithSectionTranslationAttributes_GeneratesExpecte
First summary
-
+
First content
@@ -156,7 +156,7 @@ First content Second heading -
+
First content