Skip to content
Snippets Groups Projects
Commit 87e7cee9 authored by Claas Kazzer's avatar Claas Kazzer :speech_balloon: Committed by Demian Katz
Browse files

Eliminate table summaries (HTML5) (#1103)

- replaces table summaries with captions (sr-only) to avoid validation warning 'table summary not supported in html5'
parent f85475ee
Branches
Tags
No related merge requests found
...@@ -44,7 +44,8 @@ ...@@ -44,7 +44,8 @@
$fields = $formatter->getData($driver, $formatter->getDefaults('collection-info')); $fields = $formatter->getData($driver, $formatter->getDefaults('collection-info'));
?> ?>
<? if (!empty($fields)): ?> <? if (!empty($fields)): ?>
<table id="collectionInfo" class="table table-striped" summary="<?=$this->transEsc('Bibliographic Details')?>"> <table id="collectionInfo" class="table table-striped">
<caption class="sr-only"><?=$this->transEsc('Bibliographic Details')?></caption>
<? foreach ($fields as $key => $current): ?> <? foreach ($fields as $key => $current): ?>
<tr><th><?=$this->transEsc($key)?>:</th><td><?=$current['value']?></td></tr> <tr><th><?=$this->transEsc($key)?>:</th><td><?=$current['value']?></td></tr>
<? endforeach; ?> <? endforeach; ?>
......
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
$fields = $formatter->getData($driver, $formatter->getDefaults('collection-record')); $fields = $formatter->getData($driver, $formatter->getDefaults('collection-record'));
?> ?>
<? if (!empty($fields)): ?> <? if (!empty($fields)): ?>
<table class="table table-striped" summary="<?=$this->transEsc('Bibliographic Details')?>"> <table class="table table-striped">
<caption class="sr-only"><?=$this->transEsc('Bibliographic Details')?></caption>
<? foreach ($fields as $key => $current): ?> <? foreach ($fields as $key => $current): ?>
<tr><th><?=$this->transEsc($key)?>:</th><td><?=$current['value']?></td></tr> <tr><th><?=$this->transEsc($key)?>:</th><td><?=$current['value']?></td></tr>
<? endforeach; ?> <? endforeach; ?>
......
...@@ -56,7 +56,8 @@ ...@@ -56,7 +56,8 @@
$coreFields = $formatter->getData($driver, $formatter->getDefaults('core')); $coreFields = $formatter->getData($driver, $formatter->getDefaults('core'));
?> ?>
<? if (!empty($coreFields)): ?> <? if (!empty($coreFields)): ?>
<table class="table table-striped" summary="<?=$this->transEsc('Bibliographic Details')?>"> <table class="table table-striped">
<caption class="sr-only"><?=$this->transEsc('Bibliographic Details')?></caption>
<? foreach ($coreFields as $key => $current): ?> <? foreach ($coreFields as $key => $current): ?>
<tr><th><?=$this->transEsc($key)?>:</th><td><?=$current['value']?></td></tr> <tr><th><?=$this->transEsc($key)?>:</th><td><?=$current['value']?></td></tr>
<? endforeach; ?> <? endforeach; ?>
......
...@@ -48,7 +48,8 @@ ...@@ -48,7 +48,8 @@
<div class="media-body info-col"> <div class="media-body info-col">
<h3 property="name"><?=$this->driver->getTitle()?></h3> <h3 property="name"><?=$this->driver->getTitle()?></h3>
<table class="table table-striped" summary="<?=$this->transEsc('Bibliographic Details')?>"> <table class="table table-striped">
<caption class="sr-only"><?=$this->transEsc('Bibliographic Details')?></caption>
<? foreach ($items as $key => $item): ?> <? foreach ($items as $key => $item): ?>
<? if (!empty($item['Data'])): ?> <? if (!empty($item['Data'])): ?>
<tr> <tr>
......
...@@ -5,7 +5,8 @@ ...@@ -5,7 +5,8 @@
$formatter = $this->recordDataFormatter(); $formatter = $this->recordDataFormatter();
$mainFields = $formatter->getData($driver, $formatter->getDefaults('description')); $mainFields = $formatter->getData($driver, $formatter->getDefaults('description'));
?> ?>
<table class="table table-striped" summary="<?=$this->transEsc('Description')?>"> <table class="table table-striped">
<caption class="sr-only"><?=$this->transEsc('Description')?></caption>
<? if (!empty($mainFields)): ?> <? if (!empty($mainFields)): ?>
<? foreach ($mainFields as $key => $current): ?> <? foreach ($mainFields as $key => $current): ?>
<tr><th><?=$this->transEsc($key)?>:</th><td><?=$current['value']?></td></tr> <tr><th><?=$this->transEsc($key)?>:</th><td><?=$current['value']?></td></tr>
......
...@@ -60,7 +60,8 @@ ...@@ -60,7 +60,8 @@
<?=$locationText?> <?=$locationText?>
<? endif; ?> <? endif; ?>
</h3> </h3>
<table class="table table-striped" summary="<?=$this->transEsc('holdings_details_from', ['%%location%%' => $this->transEsc($holding['location'])]) ?>"> <table class="table table-striped">
<caption class="sr-only"><?=$this->transEsc('holdings_details_from', ['%%location%%' => $this->transEsc($holding['location'])]) ?></caption>
<? $callNos = $this->tab->getUniqueCallNumbers($holding['items']); if (!empty($callNos)): ?> <? $callNos = $this->tab->getUniqueCallNumbers($holding['items']); if (!empty($callNos)): ?>
<tr> <tr>
<th><?=$this->transEsc("Call Number")?>: </th> <th><?=$this->transEsc("Call Number")?>: </th>
......
...@@ -13,7 +13,8 @@ ...@@ -13,7 +13,8 @@
<? if ($this->libraryCards->count() == 0): ?> <? if ($this->libraryCards->count() == 0): ?>
<div><?=$this->transEsc('You do not have any library cards')?></div> <div><?=$this->transEsc('You do not have any library cards')?></div>
<? else: ?> <? else: ?>
<table class="table table-striped" summary="<?=$this->transEsc('Library Cards')?>"> <table class="table table-striped">
<caption class="sr-only"><?=$this->transEsc('Library Cards')?></caption>
<tr> <tr>
<th><?=$this->transEsc('Library Card Name')?></th> <th><?=$this->transEsc('Library Card Name')?></th>
<? if ($this->multipleTargets): ?> <? if ($this->multipleTargets): ?>
......
...@@ -14,7 +14,8 @@ ...@@ -14,7 +14,8 @@
<? if (empty($this->fines)): ?> <? if (empty($this->fines)): ?>
<?=$this->transEsc('You do not have any fines')?> <?=$this->transEsc('You do not have any fines')?>
<? else: ?> <? else: ?>
<table class="table table-striped" summary="<?=$this->transEsc('Your Fines')?>"> <table class="table table-striped">
<caption class="sr-only"><?=$this->transEsc('Your Fines')?></caption>
<tr> <tr>
<th><?=$this->transEsc('Title')?></th> <th><?=$this->transEsc('Title')?></th>
<th><?=$this->transEsc('Checked Out')?></th> <th><?=$this->transEsc('Checked Out')?></th>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment