[Bug 41128] New: ratings.js creating "undefined" text for screen readers
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41128 Bug ID: 41128 Summary: ratings.js creating "undefined" text for screen readers Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: dcook@prosentient.com.au QA Contact: testopia@bugs.koha-community.org If you try to print the user summary table, you'll likely see a bunch of "undefined" text in the table. It looks like ./koha-tmpl/opac-tmpl/bootstrap/js/ratings.js iterates through some of the HTML and tries to create spans with text from the data-rating-value attribute, but that attribute doesn't exist, so it uses the text "undefined" instead: <div class="br-widget br-readonly"> <a href="#"><span class="sr-only">undefined</span></a> <a href="#"><span class="sr-only">undefined</span></a> <a href="#"><span class="sr-only">undefined</span></a> <a href="#"><span class="sr-only">undefined</span></a> <a href="#"><span class="sr-only">undefined</span></a> </div> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41128 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |39706 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39706 [Bug 39706] Accessibility: Missing text alternative for the star rating. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41128 --- Comment #1 from David Cook <dcook@prosentient.com.au> --- Created attachment 188544 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188544&action=edit Screenshot of "undefined" text in print output -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41128 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|oleonard@myacpl.org |dcook@prosentient.com.au Severity|enhancement |minor -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41128 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|ratings.js creating |ratings.js creating |"undefined" text for screen |"undefined" text for screen |readers |readers and print output -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41128 David Cook <dcook@prosentient.com.au> 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=41128 --- Comment #2 from David Cook <dcook@prosentient.com.au> --- Created attachment 188545 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188545&action=edit Bug 41128: Only use data rating if it's available This patch prevents span elements being filled with "undefined" which are then shown to screen readers and print output. Test plan: 0. Apply the patch 1. Enable the following system preference: OpacStarRatings (results, details, and patron). 2. Check out an item to a user you can log in as (e.g. koha user) 3. Go to /cgi-bin/koha/opac-user.pl in the OPAC 4. Click "Print" on the toolbar above the summary table 5. Note that 5 occurrences of "undefined" do not appear next to the title in the print output -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41128 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch 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=41128 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #188545|0 |1 is obsolete| | --- Comment #3 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 188547 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188547&action=edit Bug 41128: Only use data rating if it's available This patch prevents span elements being filled with "undefined" which are then shown to screen readers and print output. Test plan: 0. Apply the patch 1. Enable the following system preference: OpacStarRatings (results, details, and patron). 2. Check out an item to a user you can log in as (e.g. koha user) 3. Go to /cgi-bin/koha/opac-user.pl in the OPAC 4. Click "Print" on the toolbar above the summary table 5. Note that 5 occurrences of "undefined" do not appear next to the title in the print output Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41128 Paul Derscheid <paul.derscheid@lmscloud.de> 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=41128 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #188547|0 |1 is obsolete| | --- Comment #4 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 188825 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188825&action=edit Bug 41128: Only use data rating if it's available This patch prevents span elements being filled with "undefined" which are then shown to screen readers and print output. Test plan: 0. Apply the patch 1. Enable the following system preference: OpacStarRatings (results, details, and patron). 2. Check out an item to a user you can log in as (e.g. koha user) 3. Go to /cgi-bin/koha/opac-user.pl in the OPAC 4. Click "Print" on the toolbar above the summary table 5. Note that 5 occurrences of "undefined" do not appear next to the title in the print output Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41128 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |paul.derscheid@lmscloud.de QA Contact|testopia@bugs.koha-communit |paul.derscheid@lmscloud.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=41128 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=41128 --- 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=41128 Laura Escamilla <Laura.escamilla@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Needs documenting CC| |Laura.escamilla@bywatersolu | |tions.com Version(s)|25.11.00 |25.11.00, 25.05.08 released in| | --- Comment #6 from Laura Escamilla <Laura.escamilla@bywatersolutions.com> --- Backported to 25.05 thanks all! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41128 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #7 from Fridolin Somers <fridolin.somers@biblibre.com> --- Depends on Bug 39706 not in 24.11.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org