You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+22Lines changed: 22 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -98,6 +98,28 @@ We've added a new `divider` Nunjucks option on select items to support this feat
98
98
99
99
This was added in [pull request #1701: Support showing dividers between select options](https://github.com/nhsuk/nhsuk-frontend/pull/1701).
100
100
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
+
101
123
#### Add a 'size' Nunjucks option to labels and legends
102
124
103
125
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