[Bug 35157] New: The searchfieldstype select element produces invalid HTML
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35157 Bug ID: 35157 Summary: The searchfieldstype select element produces invalid HTML Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Accessibility Assignee: martin.renvoize@ptfs-europe.com Reporter: lucas@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: martin.renvoize@ptfs-europe.com, matt.blenkinsop@ptfs-europe.com, oleonard@myacpl.org Run any page that contains the "Search patrons" search bar through an HTML validator and you will see a lot of: Stray start tag span. Stray end tag span. This is because <option> tags contain spans. <span> is not a valid child element of <option> The HTML5 spec: https://html.spec.whatwg.org/multipage/form-elements.html#the-option-element There are essentially two options for what can be put inside an <option> element: 1. Test 2. Nothing These spans are added via the patronfields.inc -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35157 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35157 --- Comment #1 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 157876 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=157876&action=edit Bug 35157: Remove spans from patronfields.inc To test: 1. Run any page that contains the "Search patrons" search bar through an HTML validator and you will see a lot of: Stray start tag span. Stray end tag span. 2. Apply patch 3. Try step 1 again, no more errors from the HTML validator. 4. Make sure the patron searches still work when limiting by 'Search field'. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35157 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Severity|enhancement |normal Assignee|martin.renvoize@ptfs-europe |lucas@bywatersolutions.com |.com | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35157 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35157 --- Comment #2 from Lucas Gass <lucas@bywatersolutions.com> --- Katrin, is there something that can be done here to help improve translations? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35157 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35157 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #157876|0 |1 is obsolete| | --- Comment #3 from David Nind <david@davidnind.com> --- Created attachment 158010 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158010&action=edit Bug 35157: Remove spans from patronfields.inc To test: 1. Run any page that contains the "Search patrons" search bar through an HTML validator and you will see a lot of: Stray start tag span. Stray end tag span. 2. Apply patch 3. Try step 1 again, no more errors from the HTML validator. 4. Make sure the patron searches still work when limiting by 'Search field'. Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35157 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #4 from David Nind <david@davidnind.com> --- Testing notes (using KTD): 1. I used the HTML Validator extension (https://www.gueury.com/mozilla/) with the Chromium browser, which shows under Developer Tools. (It is available on Firefox as well, but for some reason Firefox seemed to strip the <span> tags from the option element.) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35157 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |katrin.fischer@bsz-bw.de |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35157 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- As it stands, this will move all those words back into one single string, hurting translations. I believe we can use the same trick as in the reworked title tags instead. Have a look at bug 33077. It would also be worth checking if we haven't added spans to other strings appearing inside options. I think we only need to think of where to place the: +[% PROCESS 'i18n.inc' %] -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35157 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|katrin.fischer@bsz-bw.de |testopia@bugs.koha-communit | |y.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35157 --- Comment #6 from Lucas Gass <lucas@bywatersolutions.com> --- (In reply to Katrin Fischer from comment #5)
As it stands, this will move all those words back into one single string, hurting translations. I believe we can use the same trick as in the reworked title tags instead. Have a look at bug 33077.
It would also be worth checking if we haven't added spans to other strings appearing inside options.
I think we only need to think of where to place the: +[% PROCESS 'i18n.inc' %]
If my grepping is correct we need to make sure the i18n include is in the following files: koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbiblio.tt: [% INCLUDE 'cataloging-search.inc' %] koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt: [% INCLUDE 'cataloging-search.inc' %] koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/additem.tt: [% INCLUDE 'cataloging-search.inc' %] koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/cataloging-home.tt: [% INCLUDE 'cataloging-search.inc' %] koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/concerns.tt: [% INCLUDE 'cataloging-search.inc' %] koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/merge.tt: [% INCLUDE 'cataloging-search.inc' %]q koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt: [% INCLUDE 'adv-search.inc' %] koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt: [% INCLUDE 'home-search.inc' %] koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt: [% INCLUDE 'home-search.inc' %] koha-tmpl/intranet-tmpl/prog/en/modules/members/accountline-details.tt: [% INCLUDE 'patron-search-header.inc' %] koha-tmpl/intranet-tmpl/prog/en/modules/members/alert-subscriptions.tt: [% INCLUDE 'patron-search-header.inc' %] koha-tmpl/intranet-tmpl/prog/en/modules/members/apikeys.tt: [% INCLUDE 'patron-search-header.inc' %] koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt: [% INCLUDE 'patron-search-header.inc' %] koha-tmpl/intranet-tmpl/prog/en/modules/members/deletemem.tt: [% INCLUDE 'patron-search-header.inc' %] koha-tmpl/intranet-tmpl/prog/en/modules/members/discharge.tt: [% INCLUDE 'patron-search-header.inc' %] koha-tmpl/intranet-tmpl/prog/en/modules/members/discharges.tt: [% INCLUDE 'patron-search-header.inc' %] koha-tmpl/intranet-tmpl/prog/en/modules/members/files.tt: [% INCLUDE 'patron-search-header.inc' %] koha-tmpl/intranet-tmpl/prog/en/modules/members/holdshistory.tt: [% INCLUDE 'patron-search-header.inc' %] koha-tmpl/intranet-tmpl/prog/en/modules/members/housebound.tt: [% INCLUDE 'patron-search-header.inc' %] koha-tmpl/intranet-tmpl/prog/en/modules/members/ill-requests.tt: [% INCLUDE 'patron-search-header.inc' %] koha-tmpl/intranet-tmpl/prog/en/modules/members/mancredit.tt: [% INCLUDE 'patron-search-header.inc' %] koha-tmpl/intranet-tmpl/prog/en/modules/members/maninvoice.tt: [% INCLUDE 'patron-search-header.inc' %] koha-tmpl/intranet-tmpl/prog/en/modules/members/member-flags.tt: [% INCLUDE 'patron-search-header.inc' %] koha-tmpl/intranet-tmpl/prog/en/modules/members/member-password.tt: [% INCLUDE 'patron-search-header.inc' %] koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt: [% INCLUDE 'patron-search-header.inc' %] koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tt: [% INCLUDE 'patron-search-header.inc' %] koha-tmpl/intranet-tmpl/prog/en/modules/members/members-update.tt: [% INCLUDE 'patron-search-header.inc' %] koha-tmpl/intranet-tmpl/prog/en/modules/members/merge-patrons.tt: [% INCLUDE 'patron-search-header.inc' %] koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt: [% INCLUDE 'patron-search-header.inc' %] koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt: [% INCLUDE 'patron-search-header.inc' %] koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt: [% INCLUDE 'patron-search-header.inc' %] koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt: [% INCLUDE 'patron-search-header.inc' %] koha-tmpl/intranet-tmpl/prog/en/modules/members/purchase-suggestions.tt: [% INCLUDE 'patron-search-header.inc' %] koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt: [% INCLUDE 'patron-search-header.inc' %] koha-tmpl/intranet-tmpl/prog/en/modules/members/recallshistory.tt: [% INCLUDE 'patron-search-header.inc' %] koha-tmpl/intranet-tmpl/prog/en/modules/members/routing-lists.tt: [% INCLUDE 'patron-search-header.inc' %] koha-tmpl/intranet-tmpl/prog/en/modules/members/statistics.tt: [% INCLUDE 'patron-search-header.inc' %] koha-tmpl/intranet-tmpl/prog/en/modules/members/two_factor_auth.tt: [% INCLUDE 'patron-search-header.inc' %] koha-tmpl/intranet-tmpl/prog/en/modules/tools/import_borrowers.tt: [% INCLUDE 'patron-search-header.inc' %] koha-tmpl/intranet-tmpl/prog/en/modules/tools/picture-upload.tt: [% INCLUDE 'patron-search-header.inc' %] So we need to add it to these 2 templates: koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt koha-tmpl/intranet-tmpl/prog/en/modules/members/alert-subscriptions.tt -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35157 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #158010|0 |1 is obsolete| | --- Comment #7 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 158226 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=158226&action=edit Bug 35157: Remove spans from patronfields.inc To test: 1. Run any page that contains the "Search patrons" search bar through an HTML validator and you will see a lot of: Stray start tag span. Stray end tag span. 2. Apply patch 3. Try step 1 again, no more errors from the HTML validator. 4. Make sure the patron searches still work when limiting by 'Search field'. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35157 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35157 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #158226|0 |1 is obsolete| | --- Comment #8 from Brendan Lawlor <blawlor@clamsnet.org> --- Created attachment 159112 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159112&action=edit Bug 35157: Remove spans from patronfields.inc Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35157 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |blawlor@clamsnet.org --- Comment #9 from Brendan Lawlor <blawlor@clamsnet.org> --- I tested this using this plugin: https://chrispederick.com/work/web-developer/ before the patch there were 56 stray start and end tags found tag span. After the patch there were 0. Just a note there was one other invalid html error and one warning found by the validator that maybe need another patch? I ran the validator on http://localhost:8081/cgi-bin/koha/members/members-home.pl Error: Stray end tag td.
From line 1010, column 39; to line 1010, column 43
Expires on</td>↩ Warning: Empty heading.
From line 1037, column 17; to line 1037, column 64
<h4 class="modal-title" id="patronPreviewLabel"></h4>↩ -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35157 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |victor@tuxayo.net QA Contact|testopia@bugs.koha-communit |victor@tuxayo.net |y.org | --- Comment #10 from Victor Grousset/tuxayo <victor@tuxayo.net> --- (In reply to Lucas Gass from comment #6)
If my grepping is correct we need to make sure the i18n include is in the following files: [...] So we need to add it to these 2 templates:
koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt koha-tmpl/intranet-tmpl/prog/en/modules/members/alert-subscriptions.tt
After double checking, it's correct :) In the last weeks, intranet-main.tt also got the i18n include from another ticket so it's end it's just alert-subscriptions.tt -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35157 --- Comment #11 from Victor Grousset/tuxayo <victor@tuxayo.net> --- *in the end -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35157 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #159112|0 |1 is obsolete| | --- Comment #12 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Created attachment 159197 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=159197&action=edit Bug 35157: Remove spans from patronfields.inc To test: 1. Run any page that contains the "Search patrons" search bar through an HTML validator and you will see a lot of: Stray start tag span. Stray end tag span. 2. Apply patch 3. Try step 1 again, no more errors from the HTML validator. 4. Make sure the patron searches still work when limiting by 'Search field'. Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35157 Victor Grousset/tuxayo <victor@tuxayo.net> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #13 from Victor Grousset/tuxayo <victor@tuxayo.net> --- Works, makes sense, QA script happy, code looks good, passing QA :) (@Lucas: somehow your patch attached on comment 7 didn't have the test plan in the commit message. But it was only in the BZ comment. So it was lost on signoff.)a -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35157 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |24.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35157 --- Comment #14 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.05! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35157 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Version(s)|24.05.00 |24.05.00,23.11.01 released in| | CC| |fridolin.somers@biblibre.co | |m --- Comment #15 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 23.11.x for 23.11.01 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35157 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org