-
Notifications
You must be signed in to change notification settings - Fork 237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update fieldset examples to use macros #179
Conversation
You can preview this change here: Built with commit 9cdfd66 https://deploy-preview-179--govuk-design-system-preview.netlify.com |
name: "passport-number" | ||
}) }} | ||
{% call govukFieldset({ | ||
"legendHtml": '<h3 class="govuk-heading-m govuk-!-mb-r1">Passport number</h3>', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we instead here set a class for the legend, do we need the nested heading?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding a heading in a legend helps AT users to navigate using headings. (see #724), so I see it bringing value and no harm.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think adding a class to the legend would also not work if the question needed a hint (unless the hint styles are defensive enough to be able to be used as a descendant of govuk-heading-m
).
|
||
{{ govukInput({ | ||
"label": { | ||
"html": 'Town or city' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to use html
here?
|
||
{{ govukInput({ | ||
"label": { | ||
"html": '<span class="govuk-h-visually-hidden">Building and street line 2 of 2</span>' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if we could pass through classes
to label
here and avoid using html
?
Instead of placing
(Thanks for talking me through this @dashouse!) |
Currently all examples using the fieldset (when not using a component that has it integrated) use HTML only.
This updates all examples to use macros (thanks for teaching me how to do this @alex-ju)