[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#980921: Pages in HTML5



Package: www.debian.org
User: www.debian.org@packages.debian.org
Usertag: scripts
Severity: normal

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

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


Reply to: