From 085d5807eb564b3e770cabb2e790010f67892bbb Mon Sep 17 00:00:00 2001 From: Claas Kazzer <kazzer@uni-leipzig.de> Date: Tue, 9 Mar 2021 17:35:28 +0100 Subject: [PATCH] refs #18276 [finc: Table border bug] fixes borders on sr-only captions * moves sr-only class into span tag surrounding the caption text --- themes/finc/templates/Helpers/branchinfo.phtml | 3 +-- .../RecordDriver/DefaultRecord/collection-info.phtml | 2 +- .../RecordDriver/DefaultRecord/collection-record.phtml | 2 +- themes/finc/templates/RecordDriver/DefaultRecord/core.phtml | 2 +- themes/finc/templates/RecordDriver/SolrAI/core.phtml | 2 +- themes/finc/templates/RecordDriver/SolrLido/core.phtml | 2 +- themes/finc/templates/RecordDriver/SolrMarc/core.phtml | 2 +- themes/finc/templates/RecordTab/description.phtml | 2 +- themes/finc/templates/RecordTab/descriptionlido.phtml | 2 +- themes/finc/templates/RecordTab/holdingsils.phtml | 2 +- themes/finc/templates/RecordTab/topics.phtml | 4 +--- themes/finc/templates/librarycards/home.phtml | 6 ++++-- themes/finc/templates/myresearch/fines.phtml | 2 +- 13 files changed, 16 insertions(+), 17 deletions(-) diff --git a/themes/finc/templates/Helpers/branchinfo.phtml b/themes/finc/templates/Helpers/branchinfo.phtml index dc51222d8ab..5ae9247f652 100644 --- a/themes/finc/templates/Helpers/branchinfo.phtml +++ b/themes/finc/templates/Helpers/branchinfo.phtml @@ -1,7 +1,6 @@ <!-- helpers - branchinfo.phtml --> <table> - <caption class="sr-only"> - <?= $this->transEsc('Address-Contact-Hours') ?> + <caption><span class="sr-only"><?= $this->transEsc('Address-Contact-Hours') ?></span> </caption> <tr class="holding-info"> <td colspan="4"> diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/collection-info.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/collection-info.phtml index 9a632703f39..2b96c5e0466 100644 --- a/themes/finc/templates/RecordDriver/DefaultRecord/collection-info.phtml +++ b/themes/finc/templates/RecordDriver/DefaultRecord/collection-info.phtml @@ -52,7 +52,7 @@ <?php /* finc: we use 'collapse in' to initially hide the content, we also include responsive data table - CK */ ?> <table id="collectionInfo" class="table table-striped table-resp-data collapse in"> - <caption class="sr-only"><?=$this->transEsc('Bibliographic Details')?></caption> + <caption><span class="sr-only"><?=$this->transEsc('Bibliographic Details')?></span></caption> <?php foreach ($fields as $current): ?> <tr><th><?=$this->transEsc($current['label'])?>:</th><td data-title="<?= $this->transEsc($current['label']) ?>:"><?=$current['value']?></td></tr> <?php endforeach; ?> diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/collection-record.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/collection-record.phtml index 0b79440ae62..d6bed8b7ffb 100644 --- a/themes/finc/templates/RecordDriver/DefaultRecord/collection-record.phtml +++ b/themes/finc/templates/RecordDriver/DefaultRecord/collection-record.phtml @@ -9,7 +9,7 @@ <?php if (!empty($fields)): ?> <?php /* include responsive data table - CK */ ?> <table class="table table-striped table-resp-data"> - <caption class="sr-only"><?=$this->transEsc('Bibliographic Details')?></caption> + <caption><span class="sr-only"><?=$this->transEsc('Bibliographic Details')?></span></caption> <?php foreach ($fields as $current): ?> <tr><th><?=$this->transEsc($current['label'])?>:</th><td data-title="<?= $this->transEsc($current['label']) ?>:"><?=$current['value']?></td></tr> <?php endforeach; ?> diff --git a/themes/finc/templates/RecordDriver/DefaultRecord/core.phtml b/themes/finc/templates/RecordDriver/DefaultRecord/core.phtml index 2fb24aa1bf3..e7b39706ee3 100644 --- a/themes/finc/templates/RecordDriver/DefaultRecord/core.phtml +++ b/themes/finc/templates/RecordDriver/DefaultRecord/core.phtml @@ -65,7 +65,7 @@ <?php if (!empty($coreFields)): ?> <?php /* include responsive data table - CK */ ?> <table class="table table-striped table-resp-data"> - <caption class="sr-only"><?= $this->transEsc('Bibliographic Details') ?></caption> + <caption><span class="sr-only"><?= $this->transEsc('Bibliographic Details') ?></span></caption> <?php foreach ($coreFields as $current): ?> <tr> <th><?= $this->transEsc($current['label']) ?>:</th> diff --git a/themes/finc/templates/RecordDriver/SolrAI/core.phtml b/themes/finc/templates/RecordDriver/SolrAI/core.phtml index 8ff58d1fdd3..504fe19d7dc 100644 --- a/themes/finc/templates/RecordDriver/SolrAI/core.phtml +++ b/themes/finc/templates/RecordDriver/SolrAI/core.phtml @@ -65,7 +65,7 @@ <?php if (!empty($coreFields)): ?> <?php /* include responsive data table - CK */ ?> <table class="table table-striped table-resp-data"> - <caption class="sr-only"><?= $this->transEsc('Bibliographic Details') ?></caption> + <caption><span class="sr-only"><?= $this->transEsc('Bibliographic Details') ?></span></caption> <?php foreach ($coreFields as $current): ?> <?php if ($current['label'] == null): ?> <?= $current['value'] ?> diff --git a/themes/finc/templates/RecordDriver/SolrLido/core.phtml b/themes/finc/templates/RecordDriver/SolrLido/core.phtml index 8eed15270f9..5436e6000a8 100644 --- a/themes/finc/templates/RecordDriver/SolrLido/core.phtml +++ b/themes/finc/templates/RecordDriver/SolrLido/core.phtml @@ -90,7 +90,7 @@ <?php if (!empty($coreFields)): ?> <?php /* include responsive data table - CK */ ?> <table class="table table-striped table-resp-data"> - <caption class="sr-only"><?=$this->transEsc('Bibliographic Details')?></caption> + <caption><span class="sr-only"><?=$this->transEsc('Bibliographic Details')?></span></caption> <?php foreach ($coreFields as $current): ?> <?php if ($current['label'] == null): ?> <?=$current['value']?> diff --git a/themes/finc/templates/RecordDriver/SolrMarc/core.phtml b/themes/finc/templates/RecordDriver/SolrMarc/core.phtml index 36078b3bbbd..89f4018e26a 100644 --- a/themes/finc/templates/RecordDriver/SolrMarc/core.phtml +++ b/themes/finc/templates/RecordDriver/SolrMarc/core.phtml @@ -65,7 +65,7 @@ <?php if (!empty($coreFields)): ?> <?php /* include responsive data table - CK */ ?> <table class="table table-striped table-resp-data"> - <caption class="sr-only"><?= $this->transEsc('Bibliographic Details') ?></caption> + <caption><span class="sr-only"><?= $this->transEsc('Bibliographic Details') ?></span></caption> <?php foreach ($coreFields as $current): ?> <?php if ($current['label'] == null): ?> <?= $current['value'] ?> diff --git a/themes/finc/templates/RecordTab/description.phtml b/themes/finc/templates/RecordTab/description.phtml index 48285ed3c4f..0e39ff89ba9 100644 --- a/themes/finc/templates/RecordTab/description.phtml +++ b/themes/finc/templates/RecordTab/description.phtml @@ -10,7 +10,7 @@ $mainFields = $formatter->getData($driver, $formatter->getDefaults('description' <table class="table table-striped table-resp-data"> <?php /* Table gets filled via recordDriver/.../data-... templates as referenced in RecordDataFormatterFactory */ ?> - <caption class="sr-only"><?=$this->transEsc('Description')?></caption> + <caption><span class="sr-only"><?=$this->transEsc('Description')?></span></caption> <?php if (!empty($mainFields)): ?> <?php foreach ($mainFields as $current): ?> <tr> diff --git a/themes/finc/templates/RecordTab/descriptionlido.phtml b/themes/finc/templates/RecordTab/descriptionlido.phtml index 2afd501a844..939b171f95e 100644 --- a/themes/finc/templates/RecordTab/descriptionlido.phtml +++ b/themes/finc/templates/RecordTab/descriptionlido.phtml @@ -11,7 +11,7 @@ $mainFields = $formatter->getData($driver, $formatter->getDefaults('description- finc: remove schema tag here but keep in core, include responsive data table - CK */ ?> <table class="table table-striped table-resp-data"> - <caption class="sr-only"><?= $this->transEsc('Description') ?></caption> + <caption><span class="sr-only"><?= $this->transEsc('Description') ?></span></caption> <?php if (!empty($mainFields)): ?> <?php foreach ($mainFields as $current): ?> <tr><th><?=$this->transEsc($current['label'])?>:</th><td lang="" data-title="<?= $this->transEsc($current['label']) ?>:"><?=$current['value']?></td></tr> diff --git a/themes/finc/templates/RecordTab/holdingsils.phtml b/themes/finc/templates/RecordTab/holdingsils.phtml index 2a1b7d38980..f83b8b0688e 100644 --- a/themes/finc/templates/RecordTab/holdingsils.phtml +++ b/themes/finc/templates/RecordTab/holdingsils.phtml @@ -106,7 +106,7 @@ if (!empty($holdingTitleHold)): ?> <?php /* finc: this next section produces an empty table in some cases - the table borders collapse, producing a thick line - should be solved more elegantly - Fixme. include responsive data table - CK */ ?> <table class="table table-striped table-resp-data"> - <caption class="sr-only"><?=$this->transEsc('holdings_details_from', ['%%location%%' => $this->transEsc($holding['location'])])?></caption> + <caption><span class="sr-only"><?=$this->transEsc('holdings_details_from', ['%%location%%' => $this->transEsc($holding['location'])])?></span></caption> <?php /* finc: change order and structure of table #13606 - VE */ ?> <?php foreach ($holding['items'] as $row): ?> <?php diff --git a/themes/finc/templates/RecordTab/topics.phtml b/themes/finc/templates/RecordTab/topics.phtml index 13f6cd36929..40d1f149f83 100644 --- a/themes/finc/templates/RecordTab/topics.phtml +++ b/themes/finc/templates/RecordTab/topics.phtml @@ -5,9 +5,7 @@ $this->headTitle($this->translate('Topics') . ': ' . $this->driver->getBreadcrum ?> <table class="table table-striped table-resp-data"> - <caption class="sr-only"> - <?=$this->transEsc('Topics')?> - </caption> + <caption><span class="sr-only"><?=$this->transEsc('Topics')?></span></caption> <?php if ($rvk = $this->driver->tryMethod('getRvkWithMetadata')): ?> <?php $contentDisplayed = true; ?> <tr> diff --git a/themes/finc/templates/librarycards/home.phtml b/themes/finc/templates/librarycards/home.phtml index 3e952a5f02e..25338aa28e5 100644 --- a/themes/finc/templates/librarycards/home.phtml +++ b/themes/finc/templates/librarycards/home.phtml @@ -21,8 +21,10 @@ <?php else: ?> <?php /* Table works without further responsiveness code inserted - CK */ ?> <table class="table table-striped"> - <caption class="sr-only"> - <?=$this->transEsc('Library Cards')?> + <caption> + <span class="sr-only"> + <?=$this->transEsc('Library Cards')?> + </span> </caption> <tr> <th><?=$this->transEsc('Library Card Name')?></th> diff --git a/themes/finc/templates/myresearch/fines.phtml b/themes/finc/templates/myresearch/fines.phtml index a77e2fdcc7e..a4054ab251f 100644 --- a/themes/finc/templates/myresearch/fines.phtml +++ b/themes/finc/templates/myresearch/fines.phtml @@ -68,7 +68,7 @@ ?> <?php /* include responsive data table - CK */ ?> <table class="table table-striped table-resp-data-md"> - <caption class="sr-only"><?=$this->transEsc('Your Fines')?></caption> + <caption><span class="sr-only"><?=$this->transEsc('Your Fines')?></span></caption> <tr> <?php foreach ($columns as $header): ?> <th><?=$this->transEsc($header)?></th> -- GitLab