-
Notifications
You must be signed in to change notification settings - Fork 4
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
Remove erroneous fieldset and fix aria description #1806
Conversation
@@ -3,6 +3,7 @@ | |||
{% from "date-input/macro.njk" import govukDateInput %} | |||
{% from "inset-text/macro.njk" import govukInsetText %} | |||
{% set title = mssgs.dob_title_you if data.isLicenceForYou else mssgs.dob_title_other %} | |||
{% set describedByTag = "date-of-birth-hint" %} |
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.
wondering if way to do this in route so can test?
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.
As I see this, it's the id for an element on the page which is passed to a sub-template. As such, I think we can get away with just having it in the template rather than needing to have it in the getData function. However, I do think that if we're using a variable in this way, the div with this id should use the variable rather than having the id hard-coded.
@@ -3,6 +3,7 @@ | |||
{% from "date-input/macro.njk" import govukDateInput %} | |||
{% from "inset-text/macro.njk" import govukInsetText %} | |||
{% set title = mssgs.dob_title_you if data.isLicenceForYou else mssgs.dob_title_other %} | |||
{% set describedByTag = "date-of-birth-hint" %} |
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.
As I see this, it's the id for an element on the page which is passed to a sub-template. As such, I think we can get away with just having it in the template rather than needing to have it in the getData function. However, I do think that if we're using a variable in this way, the div with this id should use the variable rather than having the id hard-coded.
{{ mssgs.dob_entry_hint }} | ||
</div> | ||
</fieldset> | ||
<div id="date-of-birth-hint" class="govuk-hint"> |
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.
So here, it should be <div id="{{ describedByTag }}" class="govuk-hint">
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.
Ahh good shout, will fix
Kudos, SonarCloud Quality Gate passed! |
https://eaflood.atlassian.net/browse/IWTF-3676