From mboxrd@z Thu Jan 1 00:00:00 1970 From: dlcampbell at gmx.com (Daniel Campbell) Date: Sat, 20 Oct 2018 02:12:33 -0700 Subject: [BUG] cgit W3 validator fail In-Reply-To: References: Message-ID: <20181020091233.GC4977@clocktown> On Thu, Oct 18, 2018 at 10:27:29AM +0300, Anast Gramm wrote: > Hello. I recently got into some html "programming" and found out > about the w3 validator service https://validator.w3.org/ > > Upon running it on a cgit site I own an error occurred: > > > The summary attribute on the table element is obsolete. > > Consider describing the structure of the table in a caption element > > or in a figure element containing the table; or, simplify the > > structure of the table so that no description is needed. > > A quick grep through the code showed some lines containing the obsolete > html. > > Should the summary attribute be moved into a caption or > should it be removed all together? The summary attribute is deprecated in HTML 5. Earlier versions may still support it. I checked the source on various pages in my cgit installation and they seem to contain generic information like "repository info", "repository list", and so on. These same tables already have CSS classes applied, though one could choose to style the two differently with CSS(3) rules like: table[summary="repository info"] { color: #f00; } I wrote two patches to fix this: the first patch simply removes the "summary='...'" parts, and the second adds classes (where needed) so that style writers that used the above method to style can still target the same elements, retaining specificity and shortening their selectors. I have attached the patches to this e-mail for review. ~Daniel -- -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-ui-remove-summary-attribute-from-table-elements.patch Type: text/x-diff Size: 4444 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 0002-ui-add-classes-to-supplement-missing-summary-info.patch Type: text/x-diff Size: 2532 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: Digital signature URL: