Bugzilla – Attachment 185310 Details for
Bug 38642
DataTables expand button has no label
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38642: [Alternate] DataTables expand button has no label
Bug-38642-Alternate-DataTables-expand-button-has-n.patch (text/plain), 19.07 KB, created by
Jake Deery
on 2025-08-11 16:56:32 UTC
(
hide
)
Description:
Bug 38642: [Alternate] DataTables expand button has no label
Filename:
MIME Type:
Creator:
Jake Deery
Created:
2025-08-11 16:56:32 UTC
Size:
19.07 KB
patch
obsolete
>From f376ec8dd868e77e32409614521d38b293837808 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 28 Jul 2025 15:20:07 +0000 >Subject: [PATCH] Bug 38642: [Alternate] DataTables expand button has no label > >This patch modifies the OPAC's DataTables JS so that any table >heading with a "dtr-control-col" will trigger the application of title >and aria-label attributes on the responsive controls column. > >All OPAC tables with a responsive configuration have been modified with >the class. > >To test, apply the patch and check all affected tables. > >- Narrow the width of the browser window until the responsive > functionality is triggered. >- Check that the expand/collapse button has title and aria-label > attributes, "Expand or collapse row details" > > - Authority search results > - Course reserves - List of courses > - Course reserves - List of titles for a course > - Bibliographic detail page: > - Holdsings > - Subscriptions > - Search history > - Bibliographic, past and present > - Authorities, past and present > - Most popular titles > - Logged in user's active clubs > - Logged in user's scheduled curbside pickups > - Logged in user's recalls history > - Logged in user's checkout history > - Logged in user's messaging settings > - Logged in user's submitted tags > >Sponsored-by: Athens County Public Libraries > >Signed-off-by: Jake Deery <jake.deery@openfifth.co.uk> >--- > .../bootstrap/en/modules/clubs/clubs-tab.tt | 4 ++-- > .../en/modules/opac-authoritiessearchresultlist.tt | 2 +- > .../bootstrap/en/modules/opac-course-details.tt | 2 +- > .../bootstrap/en/modules/opac-course-reserves.tt | 2 +- > .../bootstrap/en/modules/opac-curbside-pickups.tt | 2 +- > .../opac-tmpl/bootstrap/en/modules/opac-detail.tt | 13 ++----------- > .../bootstrap/en/modules/opac-messaging.tt | 2 +- > .../bootstrap/en/modules/opac-readingrecord.tt | 2 +- > .../opac-tmpl/bootstrap/en/modules/opac-recalls.tt | 2 +- > .../bootstrap/en/modules/opac-search-history.tt | 8 ++++---- > .../opac-tmpl/bootstrap/en/modules/opac-tags.tt | 2 +- > .../bootstrap/en/modules/opac-topissues.tt | 2 +- > .../opac-tmpl/bootstrap/en/modules/opac-user.tt | 10 +++++----- > .../opac-tmpl/bootstrap/en/modules/sco/sco-main.tt | 2 +- > koha-tmpl/opac-tmpl/bootstrap/js/datatables.js | 13 +++++++++++++ > 15 files changed, 36 insertions(+), 32 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/clubs/clubs-tab.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/clubs/clubs-tab.tt >index 818e363ea4c..0e56b7e112a 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/clubs/clubs-tab.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/clubs/clubs-tab.tt >@@ -11,7 +11,7 @@ > <th>Description</th> > <th>Date enrolled</th> > <th class="no-sort all"> </th> >- <th></th> >+ <th class="dtr-control-col"></th> > </tr> > </thead> > >@@ -44,7 +44,7 @@ > <th class="all">Name</th> > <th>Description</th> > <th class="no-sort all"> </th> >- <th></th> >+ <th class="dtr-control-col"></th> > </tr> > </thead> > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-authoritiessearchresultlist.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-authoritiessearchresultlist.tt >index 5abaa8e0a70..650524815b6 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-authoritiessearchresultlist.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-authoritiessearchresultlist.tt >@@ -72,7 +72,7 @@ > [% UNLESS ( isEDITORS ) %] > <th>Records</th> > [% END %] >- <th></th> >+ <th class="dtr-control-col"></th> > </tr> > </thead> > <tbody> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt >index f92dcaf79f6..7d6d9c19246 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-details.tt >@@ -76,7 +76,7 @@ > <th>Date due</th> > <th>Notes</th> > <th>Link</th> >- <th></th> >+ <th class="dtr-control-col"></th> > </tr> > </thead> > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-reserves.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-reserves.tt >index 822d0b2834e..ae44c28504a 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-reserves.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-course-reserves.tt >@@ -45,7 +45,7 @@ > <th>[% tp('Semester', 'Term') | html %]</th> > <th>Instructors</th> > <th>Notes</th> >- <th></th> >+ <th class="dtr-control-col"></th> > </tr> > </thead> > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-curbside-pickups.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-curbside-pickups.tt >index 0a4d3f67a41..d04ea9b1aae 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-curbside-pickups.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-curbside-pickups.tt >@@ -170,7 +170,7 @@ > <th>Schedule</th> > <th>Notes</th> > <th>Actions</th> >- <th></th> >+ <th class="dtr-control-col"></th> > </tr> > </thead> > <tbody> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >index 2f17db5377e..086a42e6864 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt >@@ -810,7 +810,7 @@ > <th id="serial_planneddate" data-colname="serial_planneddate">Received date</th> > <th id="serial_status" data-colname="serial_status">Status</th> > <th id="serial_notes" data-colname="serial_notes">Note</th> >- <th></th> >+ <th class="dtr-control-col"></th> > </tr> > </thead> > <tbody> >@@ -1331,7 +1331,7 @@ > [% IF ( ShowCourseReservesHeader ) %] > <th id="item_coursereserves" data-colname="item_coursereserves">Course reserves</th> > [% END %] >- <th></th> >+ <th class="dtr-control-col"></th> > </tr> > </thead> > <tbody> >@@ -1871,9 +1871,6 @@ > $("#holdingst").kohaTable( > { > dom: '<"clearfix">t', >- columnDefs: [ >- { className: "dtr-control", orderable: false, targets: -1 }, >- ], > bKohaColumnsUseNames: true, > responsive: { > details: { type: "column", target: -1 }, >@@ -1884,9 +1881,6 @@ > $("#otherholdingst").kohaTable( > { > dom: '<"clearfix">t', >- columnDefs: [ >- { className: "dtr-control", orderable: false, targets: -1 }, >- ], > bKohaColumnsUseNames: true, > responsive: { > details: { type: "column", target: -1 }, >@@ -1905,9 +1899,6 @@ > responsive: { > details: { type: "column", target: -1 }, > }, >- columnDefs: [ >- { className: "dtr-control", orderable: false, targets: -1 }, >- ], > }, > serial_table_settings > ); >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt >index e78347a334d..eceef2707bd 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-messaging.tt >@@ -61,7 +61,7 @@ > class="fa fa-info-circle" > ></i > ></th> >- <th></th> >+ <th class="dtr-control-col"></th> > </tr> > </thead> > <tbody> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt >index e24e26f6e7e..3af3875c92d 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt >@@ -121,7 +121,7 @@ > [% IF Koha.Preference('OPACMySummaryHTML') %] > <th class="no-sort no-export">Links</th> > [% END %] >- <th></th> >+ <th class="dtr-control-col"></th> > </tr> > </thead> > <tbody> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-recalls.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-recalls.tt >index 9d6a2230a53..e7e26402f9d 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-recalls.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-recalls.tt >@@ -40,7 +40,7 @@ > <th>Status</th> > <th>Due date</th> > <th class="no-sort">Modify</th> >- <th></th> >+ <th class="dtr-control-col"></th> > </tr> > </thead> > <tbody> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-search-history.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-search-history.tt >index 3190b42c0a1..47b6ae65077 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-search-history.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-search-history.tt >@@ -97,7 +97,7 @@ > <th>Date</th> > <th>Search</th> > <th>Results</th> >- <th></th> >+ <th class="dtr-control-col"></th> > </tr> > </thead> > <tbody> >@@ -150,7 +150,7 @@ > <th>Date</th> > <th>Search</th> > <th>Results</th> >- <th></th> >+ <th class="dtr-control-col"></th> > </tr> > </thead> > <tbody> >@@ -208,7 +208,7 @@ > <th>Date</th> > <th>Search</th> > <th>Results</th> >- <th></th> >+ <th class="dtr-control-col"></th> > </tr> > </thead> > <tbody> >@@ -251,7 +251,7 @@ > <th>Date</th> > <th>Search</th> > <th>Results</th> >- <th></th> >+ <th class="dtr-control-col"></th> > </tr> > </thead> > <tbody> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt >index 9acf7830976..0ea310eae88 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt >@@ -169,7 +169,7 @@ > <th class="all anti-the">Title</th> > <th>Date added</th> > <th class="no-sort"></th> >- <th></th> >+ <th class="dtr-control-col"></th> > </tr> > </thead> > <tbody> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-topissues.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-topissues.tt >index b299d103009..bd1be6d0e8f 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-topissues.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-topissues.tt >@@ -88,7 +88,7 @@ > [% IF Koha.Preference( 'opacuserlogin' ) == 1 %] > <th class="no-sort"> </th> > [% END %] >- <th></th> >+ <th class="dtr-control-col"></th> > </tr> > </thead> > <tbody> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >index 1c63a78d035..dec8d2dfcec 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >@@ -333,7 +333,7 @@ > <th class="hidden">Checkout note</th> > <th id="checkout-notes" class="no-sort no-export" title="Use this to report any problems with your currently checked out items">Report a problem</th> > [% END %] >- <th></th> >+ <th class="dtr-control-col"></th> > </tr> > </thead> > <tbody> >@@ -664,7 +664,7 @@ > <th>Barcode</th> > <th>Call number</th> > <th class="psort">Relative</th> >- <th></th> >+ <th class="dtr-control-col"></th> > </tr> > </thead> > >@@ -713,7 +713,7 @@ > [% IF ( OPACFinesTab ) %] > <th>Fines</th> > [% END %] >- <th></th> >+ <th class="dtr-control-col"></th> > </tr> > </thead> > <tbody> >@@ -837,7 +837,7 @@ > <th>Pickup location</th> > <th>Status</th> > <th class="no-sort"> </th> >- <th></th> >+ <th class="dtr-control-col"></th> > </tr> > </thead> > <tbody> >@@ -910,7 +910,7 @@ > <th class="article-request-status">Status</th> > <th class="article-request-branchcode">Pickup library</th> > <th class="article-request-cancel">Actions</th> >- <th></th> >+ <th class="dtr-control-col"></th> > </tr> > </thead> > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt >index c6a11c06cc1..89ea8c340fe 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt >@@ -187,7 +187,7 @@ > [% UNLESS ( nofines ) %] > <th>Fines</th> > [% END %] >- <th></th> >+ <th class="dtr-control-col"></th> > </tr> > </thead> > <tbody> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/js/datatables.js b/koha-tmpl/opac-tmpl/bootstrap/js/datatables.js >index 114dfcd22a2..922f8320909 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/js/datatables.js >+++ b/koha-tmpl/opac-tmpl/bootstrap/js/datatables.js >@@ -653,6 +653,19 @@ function _dt_visibility(table_settings, table_dt) { > { targets: ["string-sort"], type: "string" }, > { targets: ["anti-the"], type: "anti-the" }, > { targets: ["no-sort"], orderable: false, searchable: false }, >+ { >+ targets: ["dtr-control-col"], >+ className: "dtr-control", >+ orderable: false, >+ createdCell: function (td) { >+ $(td) >+ .attr( >+ "aria-label", >+ __("Expand or collapse row details") >+ ) >+ .attr("title", __("Expand or collapse row details")); >+ }, >+ }, > ]; > if (settings["columnDefs"] === undefined) { > settings["columnDefs"] = default_column_defs; >-- >2.43.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 38642
:
184685
|
184752
|
184793
| 185310