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>
Created attachment 188544 [details] Screenshot of "undefined" text in print output
Created attachment 188545 [details] [review] 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
Created attachment 188547 [details] [review] 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>
Created attachment 188825 [details] [review] 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>