Accessibility: improve pagination
This commit is contained in:
parent
e170c889d2
commit
472ad08090
|
@ -9,10 +9,11 @@ use Icinga\Web\Url;
|
|||
|
||||
if ($this->pageCount <= 1) return;
|
||||
|
||||
?><ul class="pagination"
|
||||
?><p id="paginationlabel" class="audible"><?= t('Pagination') ?></p>
|
||||
<ul class="pagination" aria-labelledby="paginationlabel" role="navigation"
|
||||
<?php
|
||||
|
||||
$fromto = t('%d to %d of %d');
|
||||
$fromto = t('Show rows %d to %d of %d');
|
||||
$total = $this->totalItemCount;
|
||||
$limit = $this->itemCountPerPage;
|
||||
$title_prev = sprintf(
|
||||
|
@ -28,7 +29,9 @@ $title_next = sprintf(
|
|||
($this->current + 1) * $limit,
|
||||
$total
|
||||
);
|
||||
$li = ' ><li%s><a href="%s" title="%s">%s</a></li
|
||||
$li = ' ><li%s><span class="audible">'
|
||||
. t('Page')
|
||||
. ' </span><a href="%s" title="%s">%s</a></li
|
||||
';
|
||||
|
||||
?>
|
||||
|
@ -65,7 +68,7 @@ foreach ($this->pagesInRange as $page) {
|
|||
$class,
|
||||
Url::fromRequest()->overwriteParams(
|
||||
array('page' => $page)
|
||||
)->getAbsoluteUrl(),
|
||||
),
|
||||
$title,
|
||||
$page
|
||||
);
|
||||
|
|
|
@ -309,6 +309,12 @@ html {
|
|||
display: block;
|
||||
}
|
||||
|
||||
.audible {
|
||||
left: -999em;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
/* TODO: replace this with .error */
|
||||
.fileNotReadable {
|
||||
padding: 0.5em;
|
||||
background-color: @colorCritical;
|
||||
|
|
Loading…
Reference in New Issue