diff --git a/src/GovUk.Frontend.AspNetCore.DocSamples/Pages/SummaryList/SummaryListWithActions.cshtml b/src/GovUk.Frontend.AspNetCore.DocSamples/Pages/SummaryList/SummaryListWithActions.cshtml index a18da139..07a2e57d 100644 --- a/src/GovUk.Frontend.AspNetCore.DocSamples/Pages/SummaryList/SummaryListWithActions.cshtml +++ b/src/GovUk.Frontend.AspNetCore.DocSamples/Pages/SummaryList/SummaryListWithActions.cshtml @@ -1,48 +1,48 @@ @page - - + + Name - - + + Sarah Philips - - - Change - - - - + + + Change + + + + Date of birth - - + + 5 January 1978 - - - Change - - + + + Change + + - + Contact information - - + + 72 Guild Street
London
SE23 6FH -
- - Change - + + + Change +
- + Contact details - - + +

07700 900457

sarah.phillips@example.com

-
- - Change - + + + Change +
diff --git a/src/GovUk.Frontend.AspNetCore.DocSamples/Pages/SummaryList/SummaryListWithoutActions.cshtml b/src/GovUk.Frontend.AspNetCore.DocSamples/Pages/SummaryList/SummaryListWithoutActions.cshtml index 6f56e876..e9c40fea 100644 --- a/src/GovUk.Frontend.AspNetCore.DocSamples/Pages/SummaryList/SummaryListWithoutActions.cshtml +++ b/src/GovUk.Frontend.AspNetCore.DocSamples/Pages/SummaryList/SummaryListWithoutActions.cshtml @@ -1,36 +1,36 @@ @page - - + + Name - - + + Sarah Philips - - - - + + + + Date of birth - - + + 5 January 1978 - - - - + + + + Contact information - - + + 72 Guild Street
London
SE23 6FH -
-
- - + + + + Contact details - - + +

07700 900457

sarah.phillips@example.com

-
-
+ +
diff --git a/src/GovUk.Frontend.AspNetCore/TagHelpers/SummaryListRowActionTagHelper.cs b/src/GovUk.Frontend.AspNetCore/TagHelpers/SummaryListRowActionTagHelper.cs index 91b7e61f..040de82a 100644 --- a/src/GovUk.Frontend.AspNetCore/TagHelpers/SummaryListRowActionTagHelper.cs +++ b/src/GovUk.Frontend.AspNetCore/TagHelpers/SummaryListRowActionTagHelper.cs @@ -8,10 +8,14 @@ namespace GovUk.Frontend.AspNetCore.TagHelpers /// Represents an action in a GDS summary list row. /// [HtmlTargetElement(TagName, ParentTag = SummaryListRowActionsTagHelper.TagName)] + [HtmlTargetElement(TagName, ParentTag = SummaryListRowActionsTagHelper.ShortTagName)] + [HtmlTargetElement(ShortTagName, ParentTag = SummaryListRowActionsTagHelper.TagName)] + [HtmlTargetElement(ShortTagName, ParentTag = SummaryListRowActionsTagHelper.ShortTagName)] [OutputElementHint(ComponentGenerator.SummaryListRowActionElement)] public class SummaryListRowActionTagHelper : TagHelper { internal const string TagName = "govuk-summary-list-row-action"; + internal const string ShortTagName = "action"; private const string VisuallyHiddenTextAttributeName = "visually-hidden-text"; diff --git a/src/GovUk.Frontend.AspNetCore/TagHelpers/SummaryListRowActionsTagHelper.cs b/src/GovUk.Frontend.AspNetCore/TagHelpers/SummaryListRowActionsTagHelper.cs index 8b2ed044..cfa8b5ac 100644 --- a/src/GovUk.Frontend.AspNetCore/TagHelpers/SummaryListRowActionsTagHelper.cs +++ b/src/GovUk.Frontend.AspNetCore/TagHelpers/SummaryListRowActionsTagHelper.cs @@ -8,11 +8,15 @@ namespace GovUk.Frontend.AspNetCore.TagHelpers /// Represents the actions wrapper in a GDS summary list component row. /// [HtmlTargetElement(TagName, ParentTag = SummaryListRowTagHelper.TagName)] - [RestrictChildren(SummaryListRowActionTagHelper.TagName)] + [HtmlTargetElement(TagName, ParentTag = SummaryListRowTagHelper.ShortTagName)] + [HtmlTargetElement(ShortTagName, ParentTag = SummaryListRowTagHelper.TagName)] + [HtmlTargetElement(ShortTagName, ParentTag = SummaryListRowTagHelper.ShortTagName)] + [RestrictChildren(SummaryListRowActionTagHelper.TagName, SummaryListRowActionTagHelper.ShortTagName)] [OutputElementHint(ComponentGenerator.SummaryListRowActionsElement)] public class SummaryListRowActionsTagHelper : TagHelper { internal const string TagName = "govuk-summary-list-row-actions"; + internal const string ShortTagName = "actions"; /// /// Creates a new . diff --git a/src/GovUk.Frontend.AspNetCore/TagHelpers/SummaryListRowKeyTagHelper.cs b/src/GovUk.Frontend.AspNetCore/TagHelpers/SummaryListRowKeyTagHelper.cs index 0b43915d..dc107985 100644 --- a/src/GovUk.Frontend.AspNetCore/TagHelpers/SummaryListRowKeyTagHelper.cs +++ b/src/GovUk.Frontend.AspNetCore/TagHelpers/SummaryListRowKeyTagHelper.cs @@ -8,10 +8,14 @@ namespace GovUk.Frontend.AspNetCore.TagHelpers /// Represents the value in a GDS summary list component row. /// [HtmlTargetElement(TagName, ParentTag = SummaryListRowTagHelper.TagName)] + [HtmlTargetElement(TagName, ParentTag = SummaryListRowTagHelper.ShortTagName)] + [HtmlTargetElement(ShortTagName, ParentTag = SummaryListRowTagHelper.TagName)] + [HtmlTargetElement(ShortTagName, ParentTag = SummaryListRowTagHelper.ShortTagName)] [OutputElementHint(ComponentGenerator.SummaryListRowKeyElement)] public class SummaryListRowKeyTagHelper : TagHelper { internal const string TagName = "govuk-summary-list-row-key"; + internal const string ShortTagName = "key"; /// public override async Task ProcessAsync(TagHelperContext context, TagHelperOutput output) diff --git a/src/GovUk.Frontend.AspNetCore/TagHelpers/SummaryListRowTagHelper.cs b/src/GovUk.Frontend.AspNetCore/TagHelpers/SummaryListRowTagHelper.cs index 424f601b..fab8ca2f 100644 --- a/src/GovUk.Frontend.AspNetCore/TagHelpers/SummaryListRowTagHelper.cs +++ b/src/GovUk.Frontend.AspNetCore/TagHelpers/SummaryListRowTagHelper.cs @@ -8,11 +8,19 @@ namespace GovUk.Frontend.AspNetCore.TagHelpers /// Represents a row in a GDS summary list component. /// [HtmlTargetElement(TagName, ParentTag = SummaryListTagHelper.TagName)] - [RestrictChildren(SummaryListRowKeyTagHelper.TagName, SummaryListRowValueTagHelper.TagName, SummaryListRowActionsTagHelper.TagName)] + [HtmlTargetElement(ShortTagName, ParentTag = SummaryListTagHelper.TagName)] + [RestrictChildren( + SummaryListRowKeyTagHelper.TagName, + SummaryListRowKeyTagHelper.ShortTagName, + SummaryListRowValueTagHelper.TagName, + SummaryListRowValueTagHelper.ShortTagName, + SummaryListRowActionsTagHelper.TagName, + SummaryListRowActionsTagHelper.ShortTagName)] [OutputElementHint(ComponentGenerator.SummaryListRowElement)] public class SummaryListRowTagHelper : TagHelper { internal const string TagName = "govuk-summary-list-row"; + internal const string ShortTagName = "row"; /// public override async Task ProcessAsync(TagHelperContext context, TagHelperOutput output) diff --git a/src/GovUk.Frontend.AspNetCore/TagHelpers/SummaryListRowValueTagHelper.cs b/src/GovUk.Frontend.AspNetCore/TagHelpers/SummaryListRowValueTagHelper.cs index 6db1ffc7..f298be4f 100644 --- a/src/GovUk.Frontend.AspNetCore/TagHelpers/SummaryListRowValueTagHelper.cs +++ b/src/GovUk.Frontend.AspNetCore/TagHelpers/SummaryListRowValueTagHelper.cs @@ -8,10 +8,14 @@ namespace GovUk.Frontend.AspNetCore.TagHelpers /// Represents the value in a GDS summary list component row. /// [HtmlTargetElement(TagName, ParentTag = SummaryListRowTagHelper.TagName)] + [HtmlTargetElement(TagName, ParentTag = SummaryListRowTagHelper.ShortTagName)] + [HtmlTargetElement(ShortTagName, ParentTag = SummaryListRowTagHelper.TagName)] + [HtmlTargetElement(ShortTagName, ParentTag = SummaryListRowTagHelper.ShortTagName)] [OutputElementHint(ComponentGenerator.SummaryListRowValueElement)] public class SummaryListRowValueTagHelper : TagHelper { internal const string TagName = "govuk-summary-list-row-value"; + internal const string ShortTagName = "value"; /// public override async Task ProcessAsync(TagHelperContext context, TagHelperOutput output) diff --git a/src/GovUk.Frontend.AspNetCore/TagHelpers/SummaryListTagHelper.cs b/src/GovUk.Frontend.AspNetCore/TagHelpers/SummaryListTagHelper.cs index c729201c..d0cbe1c2 100644 --- a/src/GovUk.Frontend.AspNetCore/TagHelpers/SummaryListTagHelper.cs +++ b/src/GovUk.Frontend.AspNetCore/TagHelpers/SummaryListTagHelper.cs @@ -9,7 +9,7 @@ namespace GovUk.Frontend.AspNetCore.TagHelpers /// Generates a GDS summary list component. /// [HtmlTargetElement(TagName)] - [RestrictChildren(SummaryListRowTagHelper.TagName)] + [RestrictChildren(SummaryListRowTagHelper.TagName, SummaryListRowTagHelper.ShortTagName)] [OutputElementHint(ComponentGenerator.SummaryListElement)] public class SummaryListTagHelper : TagHelper {