Skip to content

Commit ea589a1

Browse files
Add changelog entry
1 parent 243dccc commit ea589a1

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,28 @@ We've added a new `divider` Nunjucks option on select items to support this feat
9898

9999
This was added in [pull request #1701: Support showing dividers between select options](https://github.com/nhsuk/nhsuk-frontend/pull/1701).
100100

101+
#### Add a 'headingLevel' Nunjucks option to labels and legends
102+
103+
The Nunjucks option `isPageHeading` sets whether the label or legend also acts as the heading for the page.
104+
105+
We've added a new `headingLevel` Nunjucks option as a replacement for `isPageHeading` when a custom heading level is necessary, for example when a label or legend acts as the heading for a landmark:
106+
107+
```patch
108+
<aside>
109+
{{ input({
110+
label: {
111+
text: 'Search',
112+
- isPageHeading: true
113+
+ headingLevel: 2
114+
}
115+
}) }}
116+
117+
<!-- // … -->
118+
</aside>
119+
```
120+
121+
This was adde in [pull request #1670: Add label and legend `headingLevel` option](https://github.com/nhsuk/nhsuk-frontend/pull/1670).
122+
101123
#### Add a 'size' Nunjucks option to labels and legends
102124

103125
We've added a new `size` Nunjucks option to labels and legends as a simpler alternative to the size modifier classes. For example:

0 commit comments

Comments
 (0)