[Bug 40612] New: Eliminate duplicate element id in OPAC language menus
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40612 Bug ID: 40612 Summary: Eliminate duplicate element id in OPAC language menus Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: trivial Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: oleonard@myacpl.org QA Contact: testopia@bugs.koha-community.org If you have OpacLangSelectorMode set to "both" the page will have a duplicate id because the same menu include is used in the header and the footer. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40612 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40612 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40612 --- Comment #1 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 185229 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=185229&action=edit Bug 40612: Eliminate duplicate element id in OPAC language menus This patch updates the include file used to display the OPAC language menu in the header and footer. The include already makes use of a "context" variable which tells it whether it's in the header or footer. We can use the same logic to give unique ids for each instance. To test, apply the patch and rebuild the OPAC CSS. - Go to Administration -> System preferences -> OpacLangSelectorMode and set it to "both top and footer." - Go to the OPAC and inspect the HTML for each language menu. The one in the header should have the id "header_langmenu." The one in the footer should have "footer_langmenu." Sponsored-by: Athens County Public Libraries -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40612 Lin Wei <lin-wei.li@inLibro.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=40612 Lin Wei <lin-wei.li@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #185229|0 |1 is obsolete| | --- Comment #2 from Lin Wei <lin-wei.li@inLibro.com> --- Created attachment 186229 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186229&action=edit Bug 40612: Eliminate duplicate element id in OPAC language menus This patch updates the include file used to display the OPAC language menu in the header and footer. The include already makes use of a "context" variable which tells it whether it's in the header or footer. We can use the same logic to give unique ids for each instance. To test, apply the patch and rebuild the OPAC CSS. - Go to Administration -> System preferences -> OpacLangSelectorMode and set it to "both top and footer." - Go to the OPAC and inspect the HTML for each language menu. The one in the header should have the id "header_langmenu." The one in the footer should have "footer_langmenu." Sponsored-by: Athens County Public Libraries Signed-off-by: Ludovic Julien <ludovic.julien@inLibro.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40612 Ludovic <ludovic.julien@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ludovic.julien@inLibro.com --- Comment #3 from Ludovic <ludovic.julien@inLibro.com> --- Tested and works perfectly, thank you! This patch fixes a subtle but important issue. Having unique element IDs in HTML is not just a matter of clean code — it’s essential for accessibility, JavaScript functionality, and ensuring valid, predictable DOM behavior. Thanks for catching and addressing this! Small changes like this really contribute to a more solid and maintainable OPAC for everyone. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40612 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40612 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #186229|0 |1 is obsolete| | --- Comment #4 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 186471 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186471&action=edit Bug 40612: Eliminate duplicate element id in OPAC language menus This patch updates the include file used to display the OPAC language menu in the header and footer. The include already makes use of a "context" variable which tells it whether it's in the header or footer. We can use the same logic to give unique ids for each instance. To test, apply the patch and rebuild the OPAC CSS. - Go to Administration -> System preferences -> OpacLangSelectorMode and set it to "both top and footer." - Go to the OPAC and inspect the HTML for each language menu. The one in the header should have the id "header_langmenu." The one in the footer should have "footer_langmenu." Sponsored-by: Athens County Public Libraries Signed-off-by: Ludovic Julien <ludovic.julien@inLibro.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40612 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |jonathan.druart@gmail.com |y.org | CC| |lucas@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40612 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |25.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40612 --- Comment #5 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 25.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40612 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|25.11.00 |25.11.00,25.05.04 released in| | Status|Pushed to main |Pushed to stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40612 --- Comment #6 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Nice work everyone! Pushed to 25.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40612 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Needs documenting CC| |fridolin.somers@biblibre.co | |m --- Comment #7 from Fridolin Somers <fridolin.somers@biblibre.com> --- I prefer no impact 24.11.x LTS for UI stability. There might be custom CSS on this id. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org