Bug 20054

Summary: Remove attribute "text/css" for the style tags used in the OPAC templates
Product: Koha Reporter: Indranil Das Gupta <indradg>
Component: OPACAssignee: Indranil Das Gupta <indradg>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: jonathan.druart+koha, julian.maurice, martin.renvoize, nick
Version: master   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20053
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20102
Change sponsored?: --- Patch complexity: Medium patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Prevents warnings about type attribute being generated for the style tags when testing the OPAC pages using W3C Validator for HTML5.
Version(s) released in:
Attachments: Bug 20054 - Remove attribute "text/css" for <style> element in OPAC
Bug 20054: Remove attribute "text/css" for <style> element in OPAC
Bug 20054: Remove attribute "text/css" for <style> element in OPAC
Bug 20054: Remove attribute "text/css" for <style> element in OPAC
Bug 20054: Remove attribute "text/css" for <style> element in OPAC

Description Indranil Das Gupta 2018-01-21 18:09:39 UTC
Conformance rules for HTML5 is generating warnings for <style> element
with type="text/css" attribute when the OPAC page is checked
with W3C Validator. 

The type attribute is optional, and when none is provided it defaults to "text/css" - https://www.w3.org/TR/html5/document-metadata.html#element-attrdef-style-type.
Comment 1 Indranil Das Gupta 2018-01-21 18:34:51 UTC
Created attachment 70787 [details] [review]
Bug 20054 - Remove attribute "text/css" for <style> element in OPAC

Conformance rules for HTML5 is generating warnings for <style> element
with type="text/css" attribute when the OPAC page is checked
with W3C Validator.

Test plan
=========

1/ Click the "Tag cloud" link on the OPAC. Paste the URL to your OPAC
   page (if it is hosted) to W3C Validator and watch the warning about
   type attribute "text/css".

2/ Apply patch and re-submit the page to the Validator. The warning
   will be gone.
Comment 2 Owen Leonard 2018-01-22 13:38:05 UTC
Created attachment 70798 [details] [review]
Bug 20054: Remove attribute "text/css" for <style> element in OPAC

Conformance rules for HTML5 is generating warnings for <style> element
with type="text/css" attribute when the OPAC page is checked
with W3C Validator.

Test plan
=========

1/ Click the "Tag cloud" link on the OPAC. Paste the URL to your OPAC
   page (if it is hosted) to W3C Validator and watch the warning about
   type attribute "text/css".

2/ Apply patch and re-submit the page to the Validator. The warning
   will be gone.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 3 Maksim Sen 2018-01-26 20:55:52 UTC
Created attachment 70979 [details] [review]
Bug 20054: Remove attribute "text/css" for <style> element in OPAC

Conformance rules for HTML5 is generating warnings for <style> element
with type="text/css" attribute when the OPAC page is checked
with W3C Validator.

Test plan
=========

1/ Click the "Tag cloud" link on the OPAC. Paste the URL to your OPAC
   page (if it is hosted) to W3C Validator and watch the warning about
   type attribute "text/css".

2/ Apply patch and re-submit the page to the Validator. The warning
   will be gone.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Maksim Sen <maksim@inlibro.com>
Comment 4 Julian Maurice 2018-01-29 16:39:29 UTC
Created attachment 71027 [details] [review]
Bug 20054: Remove attribute "text/css" for <style> element in OPAC

Conformance rules for HTML5 is generating warnings for <style> element
with type="text/css" attribute when the OPAC page is checked
with W3C Validator.

Test plan
=========

1/ Click the "Tag cloud" link on the OPAC. Paste the URL to your OPAC
   page (if it is hosted) to W3C Validator and watch the warning about
   type attribute "text/css".

2/ Apply patch and re-submit the page to the Validator. The warning
   will be gone.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: maksim <maksim@inlibro.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Comment 5 Jonathan Druart 2018-01-30 16:54:37 UTC
What about the staff interface?
Comment 6 Owen Leonard 2018-01-30 17:02:46 UTC
I have submitted Bug 20102 - Remove attribute "text/css" for <style> element used in staff client templates.
Comment 7 Jonathan Druart 2018-02-12 19:12:55 UTC
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?
Comment 8 Jonathan Druart 2018-02-12 19:15:10 UTC
(In reply to Jonathan Druart from comment #7)
> 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?

This comment was for bug 20053.
Comment 9 Jonathan Druart 2018-02-12 19:15:57 UTC
Created attachment 71499 [details] [review]
Bug 20054: Remove attribute "text/css" for <style> element in OPAC

Conformance rules for HTML5 is generating warnings for <style> element
with type="text/css" attribute when the OPAC page is checked
with W3C Validator.

Test plan
=========

1/ Click the "Tag cloud" link on the OPAC. Paste the URL to your OPAC
   page (if it is hosted) to W3C Validator and watch the warning about
   type attribute "text/css".

2/ Apply patch and re-submit the page to the Validator. The warning
   will be gone.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: maksim <maksim@inlibro.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Comment 10 Jonathan Druart 2018-02-12 21:08:58 UTC
Pushed to master for 18.05, thanks to everybody involved!
Comment 11 Nick Clemens 2018-02-16 02:34:04 UTC
Awesome work all, pushed to stable for 17.11.03