List for cgit developers and users
 help / color / mirror / Atom feed
* [BUG] cgit W3 validator fail
@ 2018-10-18  7:27 anastasis.gramm2
  2018-10-20  9:12 ` dlcampbell
  0 siblings, 1 reply; 2+ messages in thread
From: anastasis.gramm2 @ 2018-10-18  7:27 UTC (permalink / raw)


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?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20181018/5ae8520f/attachment.html>


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [BUG] cgit W3 validator fail
  2018-10-18  7:27 [BUG] cgit W3 validator fail anastasis.gramm2
@ 2018-10-20  9:12 ` dlcampbell
  0 siblings, 0 replies; 2+ messages in thread
From: dlcampbell @ 2018-10-20  9:12 UTC (permalink / raw)


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: <http://lists.zx2c4.com/pipermail/cgit/attachments/20181020/6ac275f6/attachment.patch>
-------------- 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: <http://lists.zx2c4.com/pipermail/cgit/attachments/20181020/6ac275f6/attachment-0001.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20181020/6ac275f6/attachment.asc>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-10-20  9:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-18  7:27 [BUG] cgit W3 validator fail anastasis.gramm2
2018-10-20  9:12 ` dlcampbell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).