#980921#5
Date:
2021-01-24 12:18:55 UTC
From:
To:
Hi, we have talked a bit in the past about migrating the website to
HTML5, and we have now HTML5 tags in the homepage, that produce
validation errors.

In Salsa we have the Merge Request 619: "webwml | Replace article tags
to fix validation issue (!619)"
https://salsa.debian.org/webmaster-team/webwml/-/merge_requests/619

proposing to remove those tags, to make the document valid for the
current declaration (HTML 4.01 strict), but I agree with Boyuan Yang
that we should consider migrating to HTML5 instead.

I think that we can create a basic_html5.wml template and make the pages
that are ready to use that, and also the new pages that we write, so all
the new content uses HTML5, and then after a while we can consider
migrating the "difficult" pages.

I have created a branch for this work:

https://salsa.debian.org/webmaster-team/webwml/-/tree/html5

where I have made the minimal change to the basic.wml template (in the
basic_html5.wml file):
--- basic.wml   2021-01-22 13:19:18.512335720 +0100
+++ basic_html5.wml     2021-01-24 12:38:24.172801930 +0100
@@ -7,7 +7,7 @@

 <ifeq "$(DOCTYPE)" xhtml
    "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"
\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">"
-   "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\"
\"http://www.w3.org/TR/html4/strict.dtd\">"
+   "<!DOCTYPE html>"
 />


And then made the mainpage to use it.

Then I built the /english/index.en.html file and uploaded to
https://validator.nu/, and found these errors:

1.- Error: Bad value 05 Dec 2020 for attribute datetime on element time:
The literal did not satisfy the time-datetime format.

    From line 235, column 31; to line 235, column 106

    ect-news"><time datetime="05 Dec 2020" class="date-as-calendar
position-em size1_25x"><span

2.- [...] (more similar errors for other <time> tags in the file)

3.- Warning: Potentially bad value copyright for attribute rel on
element a: The keyword copyright for the rel attribute should not be
used. Consider using license instead.

    From line 292, column 61; to line 292, column 96
    hers; See <a href="./license" rel="copyright">licens


Now, 3 questions:
1.- I don't know if the change to the template is enough (at least to
start) or we need to declare the HTML5 in other way.

2.- About the datetime errors in the homepage, those strings are
generated by the function newsdate in the ctime.html template (called by
the get_top_news() function in the recent_list template). I think the
code that needs to be reviewed is L530 to L550 in the recent_list.wml
template, but having into account that this:
* will affect how the date is displayed, including translations
* when we migrate to HTML5 other pages using the recent_list function
this problem will arise too, since the code I refer is the part related
to the homepage only.

3.- The warning about the rel="copyright" could be easily changed by
changing the footer.wml template, but I don't know if the proposed
rel="license" is html4.01 strict-compatible, or we should create a
footer_html5.wml template for the pages that are switching to html5.

Kind regards,
-- 
Laura Arjona Reina
https://wiki.debian.org/LauraArjona

#980921#10
Date:
2021-02-20 15:49:33 UTC
From:
To:
When thinking about the migration, please also take into account the
effect of moving to HTML on the validation script.

I don't know whether I did it correctly, but for me simply replacing the
doctype with "html" caused the validation script to fail with:

*** Errors validating ../view-source_https___www.debian.org.html: ***
Line 1, character 15:  no internal or external document type declaration
	subset; will parse without validation
Line 51, character 24:	general entity "nbsp" not defined and no default
	entity
Line 51, character 28:	reference to entity "nbsp" for which no system
	identifier could be generated
Line 256, character 115:  reference to entity "nbsp" for which no system
	identifier could be generated
Line 257, character 121:  reference to entity "nbsp" for which no system
	identifier could be generated
Line 261, character 117:  reference to entity "nbsp" for which no system
	identifier could be generated
Line 265, character 118:  reference to entity "nbsp" for which no system
	identifier could be generated
Line 267, character 115:  reference to entity "nbsp" for which no system
	identifier could be generated
Line 270, character 116:  reference to entity "nbsp" for which no system
	identifier could be generated
Line 272, character 118:  reference to entity "nbsp" for which no system
	identifier could be generated

I suppose this is because the validator is based on the DTDs in
/usr/share/sgml/html/... and there is none for HTML5 there?

#980921#15
Date:
2022-04-20 13:12:15 UTC
From:
To:
Hi all
I have added a basic5.wml and template5.wml templates in
/english/templates/debian to start using them in the files that already have
HTML5 tags.

https://salsa.debian.org/webmaster-team/webwml/-/commit/8dc031327d5b4147c02030aac97866283094286d

I have changed mainpage.wml to use the new templates (mainpage.wml is only used
in the homepage).

https://salsa.debian.org/webmaster-team/webwml/-/commit/a10f9519aee4f29278a7c597da8071cd42f9df97


I have updated the recent_list.wml template so the datetime values are produced
in correct format.

https://salsa.debian.org/webmaster-team/webwml/-/commit/2597b5a9d1a8517d803da5ed03b87ac8cf24a11e

I have checked my tests with the homepage with https://validator.w3.org/ and
looks fine.

I'll try to have a look at the validation script and move other pages to use
these html5 templates, and fix the issues that arise.

Kind regards,