Add missing label and legend classes to HTML fixtures #2659
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Recreating the changes originally raised in #2612 by @matthew-shaw (original PR was proving difficult to rebase)
Some of the test fixture macros were missing the additional classes for labels and legends as page headings, where
isPageHeading
had been set totrue
. This PR adds them in to the macro options, along with the expected HTML output.In terms of the tests themselves this should have no impact, they will pass with or without as the output matches the expected HTML. But for projects that have ported GOV.UK Frontend to other languages and templating engines such as GOV.UK Frontend Jinja and GOV.UK React JSX, these fixtures are also used for visual component demos as well, so the classes obviously affect the rendered output.
Examples of user facing demos where headings aren't rendered correctly due to missing classes in test fixtures:
Relevant conversation about this change