In koha-tmpl/intranet-tmpl/prog/en/includes/search_indexes.inc there is : <select class="advsearch" name="idx" id="idx"> But this include is used several times, so there are several id="idx". We should remove this id.
Arf this is now used for id=refiner_idx from Bug 27546
Got to love these little gotchas...
This is bad right ?
(In reply to Fridolin Somers from comment #3) > This is bad right ? It's not good.
Some other errors I'll submit a fix for: More duplicate id problems, tab WRAPPER errors, invalid "href" attributes on <button>s, mismatched labels and form field ids.
Created attachment 170923 [details] [review] Bug 30699: Fix various HTML validity errors in staff interface templates This patch fixes several HTML validity issues in various staff interface templates. Most of these changes won't be visible in the interface. - Advanced search: - Remove stray </a> tags - Fix duplicate IDs by adding loop.index to repeated dropdown menus - Circulation - Fix mismatched label and form field id in checkouts table footer - Fix mismatched label and form field id claim returned modal - Remove invalid href attribute from button in claim returned modal - Wrap relatives' checkouts tab in conditional so that panel doesn't appear when tab has been hidden - Fix duplicate id attributes in patron messages-related markup - Remove redundant class attribute from patron messages-related markup - Acquisitions -> Vendor -> Basket -> Add to basket -> From staged file - Remove invalid "size" attribute from hidden form fields - Circulation -> Holds awaiting pickup - Fix mismatched label and form field id - Patron -> Accounting -> Pay fine -> Submit cash amount higher than the charge - Remove invalid href attribute from button in confirmation modal - Fix errors in tab markup WRAPPERs in html_helpers.inc to prevent mismatched aria-labelledby attributes - Footer language selector: - Fix markup to correct errors in aria-controls - Remove invalid href attribute from cookie consent modal Sponsored-by: Athens County Public Libraries
Created attachment 172679 [details] [review] Bug 30699: Fix various HTML validity errors in staff interface templates This patch fixes several HTML validity issues in various staff interface templates. Most of these changes won't be visible in the interface. - Advanced search: - Remove stray </a> tags - Fix duplicate IDs by adding loop.index to repeated dropdown menus - Circulation - Fix mismatched label and form field id in checkouts table footer - Fix mismatched label and form field id claim returned modal - Remove invalid href attribute from button in claim returned modal - Wrap relatives' checkouts tab in conditional so that panel doesn't appear when tab has been hidden - Fix duplicate id attributes in patron messages-related markup - Remove redundant class attribute from patron messages-related markup - Acquisitions -> Vendor -> Basket -> Add to basket -> From staged file - Remove invalid "size" attribute from hidden form fields - Circulation -> Holds awaiting pickup - Fix mismatched label and form field id - Patron -> Accounting -> Pay fine -> Submit cash amount higher than the charge - Remove invalid href attribute from button in confirmation modal - Fix errors in tab markup WRAPPERs in html_helpers.inc to prevent mismatched aria-labelledby attributes - Footer language selector: - Fix markup to correct errors in aria-controls - Remove invalid href attribute from cookie consent modal Sponsored-by: Athens County Public Libraries Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Created attachment 174064 [details] [review] Bug 30699: Fix various HTML validity errors in staff interface templates This patch fixes several HTML validity issues in various staff interface templates. Most of these changes won't be visible in the interface. - Advanced search: - Remove stray </a> tags - Fix duplicate IDs by adding loop.index to repeated dropdown menus - Circulation - Fix mismatched label and form field id in checkouts table footer - Fix mismatched label and form field id claim returned modal - Remove invalid href attribute from button in claim returned modal - Wrap relatives' checkouts tab in conditional so that panel doesn't appear when tab has been hidden - Fix duplicate id attributes in patron messages-related markup - Remove redundant class attribute from patron messages-related markup - Acquisitions -> Vendor -> Basket -> Add to basket -> From staged file - Remove invalid "size" attribute from hidden form fields - Circulation -> Holds awaiting pickup - Fix mismatched label and form field id - Patron -> Accounting -> Pay fine -> Submit cash amount higher than the charge - Remove invalid href attribute from button in confirmation modal - Fix errors in tab markup WRAPPERs in html_helpers.inc to prevent mismatched aria-labelledby attributes - Footer language selector: - Fix markup to correct errors in aria-controls - Remove invalid href attribute from cookie consent modal Sponsored-by: Athens County Public Libraries Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org> Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Pushed for 24.11! Well done everyone, thank you!
This change broke the selenium tests, but I am not sure if we should fix the template or the tests: <li data-bs-toggle="tooltip" data-bs-placement="left" title="Patron is an adult"> <a class="dropdown-item disabled" aria-disabled="true" id="updatechild" href="#">Update child to adult patron</a> <button class="dropdown-item disabled" aria-disabled="true" id="updatechild">Update child to adult patron</button> prove t/db_dependent/selenium/update_child_to_adult.t t/db_dependent/selenium/update_child_to_adult.t .. STRACE: /usr/share/perl5/Try/Tiny.pm:123 in Selenium::Remote::Driver::catch {...} /usr/share/perl5/Selenium/Remote/Driver.pm:361 in Try::Tiny::try (eval 2011):1 in Selenium::Remote::Driver::__ANON__ (eval 2013):2 in Selenium::Remote::Driver::__ANON__ /usr/share/perl5/Selenium/Remote/Driver.pm:1340 in Selenium::Remote::Driver::_execute_command /usr/share/perl5/Selenium/Remote/Driver.pm:1340 in (eval) t/db_dependent/selenium/update_child_to_adult.t:141 in Selenium::Remote::Driver::find_element /usr/share/perl/5.36/Test/Builder.pm:374 in main::__ANON__ /usr/share/perl/5.36/Test/Builder.pm:374 in (eval) /usr/share/perl/5.36/Test/More.pm:809 in Test::Builder::subtest t/db_dependent/selenium/update_child_to_adult.t:145 in Test::More::subtest /usr/share/perl/5.36/Test/Builder.pm:374 in main::__ANON__ /usr/share/perl/5.36/Test/Builder.pm:374 in (eval) /usr/share/perl/5.36/Test/More.pm:809 in Test::Builder::subtest t/db_dependent/selenium/update_child_to_adult.t:153 in Test::More::subtest # No tests run! # Failed test 'No tests run for subtest "Cannot update an adult"' # at t/db_dependent/selenium/update_child_to_adult.t line 145. # Looks like you failed 1 test of 3. t/db_dependent/selenium/update_child_to_adult.t .. 1/1 # Failed test 'Update child to patron' # at t/db_dependent/selenium/update_child_to_adult.t line 153. Error while executing command: no such element: Unable to locate element: //a[@id="updatechild"]/.. at /usr/share/perl5/Selenium/Remote/Driver.pm line 411. at /usr/share/perl5/Selenium/Remote/Driver.pm line 356. # Looks like your test exited with 255 just after 1. t/db_dependent/selenium/update_child_to_adult.t .. Dubious, test returned 255 (wstat 65280, 0xff00) Failed 1/1 subtests Test Summary Report ------------------- t/db_dependent/selenium/update_child_to_adult.t (Wstat: 65280 (exited 255) Tests: 1 Failed: 1) Failed test: 1 Non-zero exit status: 255 Files=1, Tests=1, 28 wallclock secs ( 0.02 usr 0.00 sys + 1.72 cusr 0.21 csys = 1.95 CPU) Result: FAIL
Created attachment 174323 [details] [review] Bug 30699: (follow-up) Update to fix selenium test Changing an <a> to a <button> breaks test, and changing *all* the a#updatechild's to <button>s also breaks the test, so the simple solution is to change the <button> back to <a>.
Follow-up was pushed to main.