Because there is no way of maintaining the HMRC page heading pattern and incorporating it with the current Gov Frontend components (or using aria to reference an external section heading), I’ve been recommending that services send the whole construct (without using the header
element due to permitted nesting rules) through to the legend
or label
.
It isn’t ideal but is better than having repeated content or missing the section heading. As the section heading is announced after the label then the important information is still front-loaded.
For example, construct a variable to contain the html for the heading and the caption
@headingSnippetLabel = @{"Heading copy <span class='govuk-caption-xl hmrc-caption-xl'><span class='govuk-visually-hidden'>This section is: </span>Caption copy</span>"}