Skip to content
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

Merged
merged 2 commits into from
Oct 6, 2023

Conversation

irisfaraway
Copy link
Member

@irisfaraway irisfaraway added the bug Something isn't working label Oct 2, 2023
@irisfaraway irisfaraway self-assigned this Oct 2, 2023
@@ -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" %}
Copy link
Collaborator

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?

Copy link
Collaborator

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" %}
Copy link
Collaborator

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">
Copy link
Collaborator

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">

Copy link
Member Author

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

@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 5, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@irisfaraway irisfaraway requested a review from jaucourt October 5, 2023 15:53
@irisfaraway irisfaraway merged commit e351357 into develop Oct 6, 2023
4 checks passed
@irisfaraway irisfaraway deleted the bug/iwtf-3676-fieldset branch October 6, 2023 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants