Permalink
Browse files

feat(pagination): Better keyboard tab support + focus styling

  • Loading branch information...
tmorehouse committed Oct 4, 2017
1 parent 92d0810 commit 42b31da1a12823d36a562a7640ece1b3a7d36ffd
Showing with 6 additions and 2 deletions.
  1. +6 −2 lib/components/pagination.vue
@@ -3,7 +3,6 @@
:aria-disabled="disabled ? 'true' : 'false'"
:aria-label="ariaLabel ? ariaLabel : null"
role="menubar"
@focusin.self="focusCurrent"
@keydown.left.prevent="focusPrev"
@keydown.right.prevent="focusNext"
@keydown.shift.left.prevent="focusFirst"
@@ -63,7 +62,7 @@
:aria-setsize="numberOfPages"
role="menuitemradio"
href="#"
tabindex="-1"
:tabindex="isActive(page.number) ? '0' : '-1'"
@click.prevent="setPage($event, page.number)"
@keydown.enter.prevent="setPage($event, page.number)"
@keydown.space.prevent="setPage($event, page.number)"
@@ -128,6 +127,11 @@
cursor: not-allowed;
opacity: .65;
}
.page-item .page-link:hover,
.page-item .page-link:focus {
box-shadow: 0 0 0 3px rgba(0,123,255,.5);
z-index: 1;
}
</style>
<script>

0 comments on commit 42b31da

Please sign in to comment.