From bfaa2cc3f87d1be3a194d714a2b342d2f133e043 Mon Sep 17 00:00:00 2001 From: elsenhans Date: Mon, 8 May 2023 15:57:28 +0200 Subject: [PATCH 01/29] improve accessibility for checkboxes --- languages/de.ini | 3 ++- languages/en.ini | 3 ++- module/VuFind/src/VuFind/View/Helper/Root/Record.php | 10 ++++++++++ .../RecordDriver/DefaultRecord/list-entry.phtml | 3 ++- .../RecordDriver/DefaultRecord/result-list.phtml | 7 ++++--- themes/bootstrap3/templates/cart/cart.phtml | 2 +- .../templates/myresearch/bulk-action-buttons.phtml | 2 +- .../bootstrap3/templates/myresearch/checkedout.phtml | 7 ++++--- .../bootstrap3/templates/myresearch/illrequests.phtml | 7 ++++--- .../myresearch/storageretrievalrequests.phtml | 7 ++++--- themes/bootstrap3/templates/record/cart-buttons.phtml | 4 ++-- themes/bootstrap3/templates/record/checkbox.phtml | 4 ++-- .../templates/search/bulk-action-buttons.phtml | 3 +-- 13 files changed, 39 insertions(+), 23 deletions(-) diff --git a/languages/de.ini b/languages/de.ini index 6d4e36ec32f..79bd47d3060 100644 --- a/languages/de.ini +++ b/languages/de.ini @@ -1184,7 +1184,8 @@ See also = "Siehe auch" see_all_ellipsis = "Alle anzeigen …" Select this record = "Datensatz auswählen" Select your carrier = "Wählen Sie Ihren Telefonanbieter aus" -select_page = "Alles auswählen" +select_page = "Alle Einträge der Seite auswählen" +select_page_cart = "Alle Einträge der Zwischenablage auswählen" select_pickup_location = "Abholort auswählen" select_request_group = "Abholstelle auswählen" Selected = "Ausgewählt" diff --git a/languages/en.ini b/languages/en.ini index e6aded1771b..7519f83a163 100644 --- a/languages/en.ini +++ b/languages/en.ini @@ -1184,7 +1184,8 @@ See also = "See also" see_all_ellipsis = "see all…" Select this record = "Select this record" Select your carrier = "Select your carrier" -select_page = "Select Page" +select_page = "Select all entries of the page" +select_page_cart = "Select all entries of the clipboard" select_pickup_location = "Select Pick Up Location" select_request_group = "Select Request Group" Selected = "Selected" diff --git a/module/VuFind/src/VuFind/View/Helper/Root/Record.php b/module/VuFind/src/VuFind/View/Helper/Root/Record.php index 0a0ade175a1..a114e9e3c08 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/Record.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/Record.php @@ -707,4 +707,14 @@ protected function deduplicateLinks($links) { return array_values(array_unique($links, SORT_REGULAR)); } + + /** + * Get the unique title id of the record + * + * @return string + */ + public function getTitleDescribedById() + { + return "{$this->driver->getSourceIdentifier()}|{$this->driver->getUniqueId()}"; + } } diff --git a/themes/bootstrap3/templates/RecordDriver/DefaultRecord/list-entry.phtml b/themes/bootstrap3/templates/RecordDriver/DefaultRecord/list-entry.phtml index fdbacfcb898..7a3c556ff20 100644 --- a/themes/bootstrap3/templates/RecordDriver/DefaultRecord/list-entry.phtml +++ b/themes/bootstrap3/templates/RecordDriver/DefaultRecord/list-entry.phtml @@ -14,6 +14,7 @@ $cover = $coverDetails['html']; $thumbnail = false; $thumbnailAlignment = $this->record($this->driver)->getThumbnailAlignment('list'); + $describedById = $this->record($this->driver)->getTitleDescribedById(); ?>
  • driver instanceof \VuFind\RecordDriver\Missing; ?> - record($this->driver)->getTitleHtml()?> + record($this->driver)->getTitleHtml()?> driver->tryMethod('getTitlesAltScript', [], []) as $altTitle): ?>
    diff --git a/themes/bootstrap3/templates/RecordDriver/DefaultRecord/result-list.phtml b/themes/bootstrap3/templates/RecordDriver/DefaultRecord/result-list.phtml index 3b98792ffb8..3bb7ebbc590 100644 --- a/themes/bootstrap3/templates/RecordDriver/DefaultRecord/result-list.phtml +++ b/themes/bootstrap3/templates/RecordDriver/DefaultRecord/result-list.phtml @@ -4,6 +4,7 @@ $cover = $coverDetails['html']; $thumbnail = false; $thumbnailAlignment = $this->record($this->driver)->getThumbnailAlignment('result'); + $describedById = $this->record($this->driver)->getTitleDescribedById(); if ($cover): ob_start(); ?>
    @@ -21,7 +22,7 @@
    - + record($this->driver)->getTitleHtml()?> driver->tryMethod('getTitlesAltScript', [], []) as $altTitle): ?> @@ -179,7 +180,7 @@ userlist()->getMode() !== 'disabled'): ?> permission()->allowDisplay('feature.Favorites')): ?> - + icon('user-favorites', 'icon-link__icon') ?> transEsc('Add to favorites')?>
    @@ -197,7 +198,7 @@ $hierarchyTitle): ?>