Opened 5 months ago

Closed 4 months ago

#21274 closed task (fixed)

Dig up any HTML validation errors in generated HTML

Reported by: irl Owned by: irl
Priority: Medium Milestone:
Component: Metrics/Atlas Version:
Severity: Normal Keywords:
Cc: karsten Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

This was suggested by karsten in #21166. An answer on StackOverflow details a bookmarklet for validating the generated HTML as is currently loaded on the page. I think it's worth digging into this as we've seen in #21166 and #21234 that mistakes can slip through.

The bookmarklet is here:

http://stackoverflow.com/questions/10377840/making-finding-html5-validator-bookmarklet/10420384#10420384

Once digging is completed, any issues found should be filed as tickets (preferably with patches for review).

Child Tickets

TicketSummaryOwner
#21291Relay country and flags images on search results should have alt attributesirl
#21292table elements should not have cellspacing or cellpaddingirl
#21350We should use CSS to style fingerprints, not <tt>irl
#21351SVG images on detail pages have duplicate id attributes to the divsirl
#21352Legends in graphs seem to upset the W3C validatorirl
#21429Remove line breaks in graph data URIsirl
#21430Graphs have empty paths when bandwidth data is unavailableirl

Change History (4)

comment:1 Changed 5 months ago by cypherpunks

One of the answers in the StackOverflow link refers to https://validator.w3.org/nu/about.html which also contains some bookmarklets.

comment:2 Changed 5 months ago by irl

Ok, I wish I hadn't used that.

From the search page alone:

    Error: The cellpadding attribute on the table element is obsolete. Use CSS instead.

    From line 58, column 546; to line 58, column 661

    div></div><table class="table table-bordered table-striped" id="torstatus_results" border="0" cellpadding="0" cellspacing="0">↩	<the

    Error: The cellspacing attribute on the table element is obsolete. Use CSS instead.

    From line 58, column 546; to line 58, column 661

    div></div><table class="table table-bordered table-striped" id="torstatus_results" border="0" cellpadding="0" cellspacing="0">↩	<the

    Error: The border attribute on the table element is obsolete. Use CSS instead.

    From line 58, column 546; to line 58, column 661

    div></div><table class="table table-bordered table-striped" id="torstatus_results" border="0" cellpadding="0" cellspacing="0">↩	<the

    Error: Element tbody not allowed as child of element table in this context. (Suppressing further errors from this subtree.)

    From line 85, column 10; to line 86, column 7

    ↩	</tfoot>↩<tbody><tr cl

    Contexts in which element tbody may be used:
        As a child of a table element, after any caption, colgroup, and thead elements, but only if there are no tr elements that are children of the table element. 
    Content model for element table:
        In this order: optionally a caption element, followed by zero or more colgroup elements, followed optionally by a thead element, followed by either zero or more tbody elements or one or more tr elements, followed optionally by a tfoot element, optionally intermixed with one or more script-supporting elements. 

    Error: An img element must have an alt attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images.

    From line 101, column 13; to line 101, column 89

              <img data-original-title="France" class="inline country" src="img/cc/fr.png">↩     

    Error: An img element must have an alt attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images.

    From line 107, column 13; to line 107, column 110

              <img data-original-title="Fast" class="inline flags" rel="tooltip" src="img/flags/bolt_16x16.png">↩     

    Error: An img element must have an alt attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images.

    From line 109, column 13; to line 109, column 115

              <img data-original-title="HSDir" class="inline flags" rel="tooltip" src="img/flags/book_alt_16x16.png">↩     

    Error: An img element must have an alt attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images.

    From line 111, column 13; to line 111, column 113

              <img data-original-title="Running" class="inline flags" rel="tooltip" src="img/flags/fork_14x16.png">↩     

    Error: An img element must have an alt attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images.

    From line 113, column 13; to line 113, column 110

              <img data-original-title="Stable" class="inline flags" rel="tooltip" src="img/flags/cd_16x16.png">↩     

    Error: An img element must have an alt attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images.

    From line 115, column 13; to line 115, column 111

              <img data-original-title="V2Dir" class="inline flags" rel="tooltip" src="img/flags/book_14x16.png">↩     

    Error: An img element must have an alt attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images.

    From line 117, column 13; to line 117, column 116

              <img data-original-title="Valid" class="inline flags" rel="tooltip" src="img/flags/check_alt_16x16.png">↩     

    Error: An img element must have an alt attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images.

    From line 142, column 13; to line 142, column 96

              <img data-original-title="United States" class="inline country" src="img/cc/us.png">↩     

    Error: An img element must have an alt attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images.

    From line 148, column 13; to line 148, column 113

              <img data-original-title="Running" class="inline flags" rel="tooltip" src="img/flags/fork_14x16.png">↩     

    Error: An img element must have an alt attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images.

    From line 150, column 13; to line 150, column 110

              <img data-original-title="Stable" class="inline flags" rel="tooltip" src="img/flags/cd_16x16.png">↩     

    Error: An img element must have an alt attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images.

    From line 152, column 13; to line 152, column 116

              <img data-original-title="Valid" class="inline flags" rel="tooltip" src="img/flags/check_alt_16x16.png">↩     

    Error: An img element must have an alt attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images.

    From line 177, column 13; to line 177, column 96

              <img data-original-title="United States" class="inline country" src="img/cc/us.png">↩     

    Error: An img element must have an alt attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images.

    From line 183, column 13; to line 183, column 122

              <img data-original-title="Authority" class="inline flags" rel="tooltip" src="img/flags/award_stroke_8x16.png">↩     

    Error: An img element must have an alt attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images.

    From line 185, column 13; to line 185, column 113

              <img data-original-title="Running" class="inline flags" rel="tooltip" src="img/flags/fork_14x16.png">↩     

    Error: An img element must have an alt attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images.

    From line 187, column 13; to line 187, column 110

              <img data-original-title="Stable" class="inline flags" rel="tooltip" src="img/flags/cd_16x16.png">↩     

    Error: An img element must have an alt attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images.

    From line 189, column 13; to line 189, column 111

              <img data-original-title="V2Dir" class="inline flags" rel="tooltip" src="img/flags/book_14x16.png">↩     

    Error: An img element must have an alt attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images.

    From line 191, column 13; to line 191, column 116

              <img data-original-title="Valid" class="inline flags" rel="tooltip" src="img/flags/check_alt_16x16.png">↩     

    Error: An img element must have an alt attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images.

    From line 216, column 13; to line 216, column 96

              <img data-original-title="United States" class="inline country" src="img/cc/us.png">↩     

    Error: An img element must have an alt attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images.

    From line 222, column 13; to line 222, column 110

              <img data-original-title="Fast" class="inline flags" rel="tooltip" src="img/flags/bolt_16x16.png">↩     

    Error: An img element must have an alt attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images.

    From line 224, column 13; to line 224, column 112

              <img data-original-title="Guard" class="inline flags" rel="tooltip" src="img/flags/share_16x16.png">↩     

    Error: An img element must have an alt attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images.

    From line 226, column 13; to line 226, column 113

              <img data-original-title="Running" class="inline flags" rel="tooltip" src="img/flags/fork_14x16.png">↩     

    Error: An img element must have an alt attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images.

    From line 228, column 13; to line 228, column 110

              <img data-original-title="Stable" class="inline flags" rel="tooltip" src="img/flags/cd_16x16.png">↩     

    Error: An img element must have an alt attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images.

    From line 230, column 13; to line 230, column 116

              <img data-original-title="Valid" class="inline flags" rel="tooltip" src="img/flags/check_alt_16x16.png">↩     

    Error: An img element must have an alt attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images.

    From line 255, column 13; to line 255, column 89

              <img data-original-title="France" class="inline country" src="img/cc/fr.png">↩     

    Error: An img element must have an alt attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images.

    From line 261, column 13; to line 261, column 110

              <img data-original-title="Fast" class="inline flags" rel="tooltip" src="img/flags/bolt_16x16.png">↩     

    Error: An img element must have an alt attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images.

    From line 263, column 13; to line 263, column 113

              <img data-original-title="Running" class="inline flags" rel="tooltip" src="img/flags/fork_14x16.png">↩     

    Error: An img element must have an alt attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images.

    From line 265, column 13; to line 265, column 110

              <img data-original-title="Stable" class="inline flags" rel="tooltip" src="img/flags/cd_16x16.png">↩     

    Error: An img element must have an alt attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images.

    From line 267, column 13; to line 267, column 111

              <img data-original-title="V2Dir" class="inline flags" rel="tooltip" src="img/flags/book_14x16.png">↩     

    Error: An img element must have an alt attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images.

    From line 269, column 13; to line 269, column 116

              <img data-original-title="Valid" class="inline flags" rel="tooltip" src="img/flags/check_alt_16x16.png">↩`

comment:3 Changed 5 months ago by irl

I think I've dug up all the errors we're getting back. They are listed as child tickets of this ticket. Once they are clear, we should take another pass through the validator to make sure we got them all.

comment:4 Changed 4 months ago by irl

  • Resolution set to fixed
  • Status changed from new to closed

Looking at the child tickets, this is now done. (:

Note: See TracTickets for help on using tickets.