If you run the Koha OPAC pages through the W3C validator it generates warnings about type attribute "text/javascript", since W3C now officially describes this as obsolete in HTML5 but still conforming to the standard with warnings [1] Since we are already pumping up HTML5 with <!DOCTYPE html>, I was thinking if we should consider an omnibus update to the following 47 templates so affected. The 47 templates: includes/calendar.inc includes/columns_settings.inc includes/datatables.inc includes/doc-head-close.inc includes/greybox.inc includes/opac-bottom.inc includes/password_check.inc includes/slip-print.inc modules/clubs/clubs-tab.tt modules/clubs/enroll.tt modules/opac-account.tt modules/opac-advsearch.tt modules/opac-auth-detail.tt modules/opac-auth-MARCdetail.tt modules/opac-auth.tt modules/opac-basket.tt modules/opac-course-details.tt modules/opac-course-reserves.tt modules/opac-detail.tt modules/opac-downloadshelf.tt modules/opac-full-serial-issues.tt modules/opac-idref.tt modules/opac-illrequests.tt modules/opac-imageviewer.tt modules/opac-MARCdetail.tt modules/opac-memberentry.tt modules/opac-messaging.tt modules/opac-overdrive-search.tt modules/opac-passwd.tt modules/opac-password-recovery.tt modules/opac-readingrecord.tt modules/opac-request-article.tt modules/opac-reserve.tt modules/opac-results-grouped.tt modules/opac-results.tt modules/opac-review.tt modules/opac-search-history.tt modules/opac-shareshelf.tt modules/opac-shelves.tt modules/opac-showreviews.tt modules/opac-suggestions.tt modules/opac-tags.tt modules/opac-topissues.tt modules/opac-user.tt modules/sco/help.tt modules/sco/printslip.tt modules/sco/sco-main.tt Reference: [1] https://www.w3.org/TR/2017/REC-html52-20171214/obsolete.html#warnings-for-obsolete-but-conforming-features
Created attachment 70786 [details] [review] Bug 20053 - Drop type attribute "text/javascript" in OPAC templates Conformance rules for HTML5 is generating warnings for <script> element with type="text/javascript" attribute when the OPAC page is checked with W3C Validator. This patch removes the cause of these warnings. Test plan ========= 1/ Paste the URL to your OPAC page (if it is hosted) to W3C Validator and watch about 10+ warnings being generated by the validator. 2/ Apply patch and re-submit the page to the Validator. The warnings would be gone.
Created attachment 70794 [details] [review] Bug 20053: Drop type attribute "text/javascript" in OPAC templates Conformance rules for HTML5 is generating warnings for <script> element with type="text/javascript" attribute when the OPAC page is checked with W3C Validator. This patch removes the cause of these warnings. Test plan ========= 1/ Paste the URL to your OPAC page (if it is hosted) to W3C Validator and watch about 10+ warnings being generated by the validator. 2/ Apply patch and re-submit the page to the Validator. The warnings would be gone. Signed-off-by: Owen Leonard <oleonard@myacpl.org> The QA tool raises some warnings, but these are about issues which pre-date this patch. They should be addressed in a separate bug.
@Owen: I've added the fix for the forbidden patterns detected by qa tools in a separate patch as you had suggested i.e. Bug 20066.
Created attachment 71024 [details] [review] Bug 20053: Drop type attribute "text/javascript" in OPAC templates Conformance rules for HTML5 is generating warnings for <script> element with type="text/javascript" attribute when the OPAC page is checked with W3C Validator. This patch removes the cause of these warnings. Test plan ========= 1/ Paste the URL to your OPAC page (if it is hosted) to W3C Validator and watch about 10+ warnings being generated by the validator. 2/ Apply patch and re-submit the page to the Validator. The warnings would be gone. Signed-off-by: Owen Leonard <oleonard@myacpl.org> The QA tool raises some warnings, but these are about issues which pre-date this patch. They should be addressed in a separate bug. Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Created attachment 71025 [details] [review] Bug 20053: (QA follow-up) Also drop language attribute in OPAC templates Only one occurence in opac-password-recovery.tt Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
What about the staff interface?
(In reply to Jonathan Druart from comment #6) > What about the staff interface? The staff client templates should be similarly modified, but with so many "move template javascript to the footer" patches in various stages of QA I think it should wait.
Hi Indranil, the patch does not longer apply, can you rebase? It sounds like it would be better to regenerate it, I guess you wrote a small script?
I will get to it.
Created attachment 74946 [details] [review] Bug 20053: Drop type attribute "text/javascript" in OPAC templates This patch is a reimplementation of the original from Indranil Das Gupta and the QA follow-up from Julian Maurice. Original test plan: Conformance rules for HTML5 is generating warnings for <script> element with type="text/javascript" attribute when the OPAC page is checked with W3C Validator. This patch removes the cause of these warnings. Test plan ========= 1/ Paste the URL to your OPAC page (if it is hosted) to W3C Validator and watch about 10+ warnings being generated by the validator. 2/ Apply patch and re-submit the page to the Validator. The warnings would be gone.
Created attachment 75781 [details] [review] Bug 20053: Drop type attribute "text/javascript" in OPAC templates This patch is a reimplementation of the original from Indranil Das Gupta and the QA follow-up from Julian Maurice. Original test plan: Conformance rules for HTML5 is generating warnings for <script> element with type="text/javascript" attribute when the OPAC page is checked with W3C Validator. This patch removes the cause of these warnings. Test plan ========= 1/ Paste the URL to your OPAC page (if it is hosted) to W3C Validator and watch about 10+ warnings being generated by the validator. 2/ Apply patch and re-submit the page to the Validator. The warnings would be gone. Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk>
Created attachment 75783 [details] [review] Bug 20053: Drop type attribute "text/javascript" in OPAC templates This patch is a reimplementation of the original from Indranil Das Gupta and the QA follow-up from Julian Maurice. Original test plan: Conformance rules for HTML5 is generating warnings for <script> element with type="text/javascript" attribute when the OPAC page is checked with W3C Validator. This patch removes the cause of these warnings. Test plan ========= 1/ Paste the URL to your OPAC page (if it is hosted) to W3C Validator and watch about 10+ warnings being generated by the validator. 2/ Apply patch and re-submit the page to the Validator. The warnings would be gone. Signed-off-by: Jon Knight <J.P.Knight@lboro.ac.uk> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Pushed to master for 18.11, awesome work all!
This patch has been pushed to 18.05.x and will be in 18.05.01
Too much conflicts in 17.11.x. Since its not critical, I choose not to backport