Accessibility: improve pagination

This commit is contained in:
Thomas Gelf 2014-06-20 14:27:17 +02:00
parent e170c889d2
commit 472ad08090
2 changed files with 13 additions and 4 deletions

View File

@ -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
);

View File

@ -309,6 +309,12 @@ html {
display: block;
}
.audible {
left: -999em;
position: absolute;
}
/* TODO: replace this with .error */
.fileNotReadable {
padding: 0.5em;
background-color: @colorCritical;