-
Notifications
You must be signed in to change notification settings - Fork 109
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
Switch to HTML-validate for validation #1144
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I've included a couple of simple fixes to avoid this build output: [14:38:49] Error in plugin "validateHTML"
Message:
error: <th> element must have a valid scope attribute: row, col, rowgroup or colgroup (wcag/h63) at dist/app/components/all.html:435:12:
433 | <tbody>
434 | <tr>
> 435 | <th><strong>Day of the week</strong></th>
| ^^
436 | <th><strong>Opening hours</strong></th>
437 | </tr>
438 | <tr>
Details: https://html-validate.org/rules/wcag/h63.html
error: <th> element must have a valid scope attribute: row, col, rowgroup or colgroup (wcag/h63) at dist/app/components/all.html:436:12:
434 | <tr>
435 | <th><strong>Day of the week</strong></th>
> 436 | <th><strong>Opening hours</strong></th>
| ^^
437 | </tr>
438 | <tr>
439 | <th>Monday</th>
Details: https://html-validate.org/rules/wcag/h63.html
error: <th> element must have a valid scope attribute: row, col, rowgroup or colgroup (wcag/h63) at dist/app/components/all.html:439:12:
437 | </tr>
438 | <tr>
> 439 | <th>Monday</th>
| ^^
440 | <td>9am to 6pm</td>
441 | </tr>
442 | <tr>
Details: https://html-validate.org/rules/wcag/h63.html
error: <th> element must have a valid scope attribute: row, col, rowgroup or colgroup (wcag/h63) at dist/app/components/all.html:443:12:
441 | </tr>
442 | <tr>
> 443 | <th>Tuesday</th>
| ^^
444 | <td>9am to 6pm</td>
445 | </tr>
446 | <tr>
Details: https://html-validate.org/rules/wcag/h63.html
error: <th> element must have a valid scope attribute: row, col, rowgroup or colgroup (wcag/h63) at dist/app/components/all.html:447:12:
445 | </tr>
446 | <tr>
> 447 | <th>Wednesday</th>
| ^^
448 | <td>9am to 6pm</td>
449 | </tr>
450 | <tr>
Details: https://html-validate.org/rules/wcag/h63.html
error: <th> element must have a valid scope attribute: row, col, rowgroup or colgroup (wcag/h63) at dist/app/components/all.html:451:12:
449 | </tr>
450 | <tr>
> 451 | <th>Thursday</th>
| ^^
452 | <td>9am to 6pm</td>
453 | </tr>
454 | <tr>
Details: https://html-validate.org/rules/wcag/h63.html
error: <th> element must have a valid scope attribute: row, col, rowgroup or colgroup (wcag/h63) at dist/app/components/all.html:455:12:
453 | </tr>
454 | <tr>
> 455 | <th>Friday</th>
| ^^
456 | <td>9am to 6pm</td>
457 | </tr>
458 | <tr>
Details: https://html-validate.org/rules/wcag/h63.html
error: <th> element must have a valid scope attribute: row, col, rowgroup or colgroup (wcag/h63) at dist/app/components/all.html:459:12:
457 | </tr>
458 | <tr>
> 459 | <th>Saturday</th>
| ^^
460 | <td>9am to 1pm</td>
461 | </tr>
462 | <tr>
Details: https://html-validate.org/rules/wcag/h63.html
error: <th> element must have a valid scope attribute: row, col, rowgroup or colgroup (wcag/h63) at dist/app/components/all.html:463:12:
461 | </tr>
462 | <tr>
> 463 | <th>Sunday</th>
| ^^
464 | <td>Closed</td>
465 | </tr>
466 | </tbody>
Details: https://html-validate.org/rules/wcag/h63.html
error: <th> element must have a valid scope attribute: row, col, rowgroup or colgroup (wcag/h63) at dist/app/components/details/expander.html:67:18:
65 | <tbody>
66 | <tr>
> 67 | <th><strong>Day of the week</strong></th>
| ^^
68 | <th><strong>Opening hours</strong></th>
69 | </tr>
70 | <tr>
Details: https://html-validate.org/rules/wcag/h63.html
error: <th> element must have a valid scope attribute: row, col, rowgroup or colgroup (wcag/h63) at dist/app/components/details/expander.html:68:18:
66 | <tr>
67 | <th><strong>Day of the week</strong></th>
> 68 | <th><strong>Opening hours</strong></th>
| ^^
69 | </tr>
70 | <tr>
71 | <th>Monday</th>
Details: https://html-validate.org/rules/wcag/h63.html
error: <th> element must have a valid scope attribute: row, col, rowgroup or colgroup (wcag/h63) at dist/app/components/details/expander.html:71:18:
69 | </tr>
70 | <tr>
> 71 | <th>Monday</th>
| ^^
72 | <td>9am to 6pm</td>
73 | </tr>
74 | <tr>
Details: https://html-validate.org/rules/wcag/h63.html
error: <th> element must have a valid scope attribute: row, col, rowgroup or colgroup (wcag/h63) at dist/app/components/details/expander.html:75:18:
73 | </tr>
74 | <tr>
> 75 | <th>Tuesday</th>
| ^^
76 | <td>9am to 6pm</td>
77 | </tr>
78 | <tr>
Details: https://html-validate.org/rules/wcag/h63.html
error: <th> element must have a valid scope attribute: row, col, rowgroup or colgroup (wcag/h63) at dist/app/components/details/expander.html:79:18:
77 | </tr>
78 | <tr>
> 79 | <th>Wednesday</th>
| ^^
80 | <td>9am to 6pm</td>
81 | </tr>
82 | <tr>
Details: https://html-validate.org/rules/wcag/h63.html
error: <th> element must have a valid scope attribute: row, col, rowgroup or colgroup (wcag/h63) at dist/app/components/details/expander.html:83:18:
81 | </tr>
82 | <tr>
> 83 | <th>Thursday</th>
| ^^
84 | <td>9am to 6pm</td>
85 | </tr>
86 | <tr>
Details: https://html-validate.org/rules/wcag/h63.html
error: <th> element must have a valid scope attribute: row, col, rowgroup or colgroup (wcag/h63) at dist/app/components/details/expander.html:87:18:
85 | </tr>
86 | <tr>
> 87 | <th>Friday</th>
| ^^
88 | <td>9am to 6pm</td>
89 | </tr>
90 | <tr>
Details: https://html-validate.org/rules/wcag/h63.html
error: <th> element must have a valid scope attribute: row, col, rowgroup or colgroup (wcag/h63) at dist/app/components/details/expander.html:91:18:
89 | </tr>
90 | <tr>
> 91 | <th>Saturday</th>
| ^^
92 | <td>9am to 1pm</td>
93 | </tr>
94 | <tr>
Details: https://html-validate.org/rules/wcag/h63.html
error: <th> element must have a valid scope attribute: row, col, rowgroup or colgroup (wcag/h63) at dist/app/components/details/expander.html:95:18:
93 | </tr>
94 | <tr>
> 95 | <th>Sunday</th>
| ^^
96 | <td>Closed</td>
97 | </tr>
98 | </tbody>
Details: https://html-validate.org/rules/wcag/h63.html
error: Duplicate form control name "email" (form-dup-name) at dist/app/components/checkboxes/none-of-the-above.html:68:67:
66 |
67 | <div class="nhsuk-checkboxes__item">
> 68 | <input class="nhsuk-checkboxes__input" id="contact-1" name="email" type="checkbox" value="email" data-checkbox-exclusive-group="communication-preferences" aria-controls="conditional-contact-1" aria-expanded="false">
| ^^^^^
69 | <label class="nhsuk-label nhsuk-checkboxes__label" for="contact-1">
70 | Email
71 | </label> </div>
Details: https://html-validate.org/rules/form-dup-name.html
error: Duplicate form control name "phone" (form-dup-name) at dist/app/components/checkboxes/none-of-the-above.html:82:67:
80 |
81 | <div class="nhsuk-checkboxes__item">
> 82 | <input class="nhsuk-checkboxes__input" id="contact-2" name="phone" type="checkbox" value="phone" data-checkbox-exclusive-group="communication-preferences" aria-controls="conditional-contact-2" aria-expanded="false">
| ^^^^^
83 | <label class="nhsuk-label nhsuk-checkboxes__label" for="contact-2">
84 | Phone
85 | </label> </div>
Details: https://html-validate.org/rules/form-dup-name.html
20 errors found.
[14:38:49] 'docs:build' errored after 2.47 s |
d956fbc
to
e3efe61
Compare
frankieroberto
approved these changes
Feb 19, 2025
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.
Nice!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR switches from HTMLHint to HTML-validate
It includes an .htmlvalidate.js config and moves HTML validation to the
docs:build
taskSee the GOV.UK Frontend setup for comparison
Checklist