Skip to content

Conversation

tmorehouse
Copy link
Member

@tmorehouse tmorehouse commented May 9, 2017

Added ARIA attributes:

  • aria-label
  • aria-current (set to "true" on the current page button)
  • aria-posinset reflects the page number the button represents
  • aria-setsize reflects the total number of pages (appears on each button with an aria-posinset)

Enabled keyboard navigation of buttons:

  • LEFT focus previous button
  • RIGHT focus next button
  • SHIFT+LEFT will focus first non-disabled button
  • SHIFT+RIGHT fill focus last non-disabled button
  • When pagination widget is tabbed into, the current page button is focused

New props for localisation of button aria-labels:

  • labelPrev defaults to 'Previous Page'
  • labelNext defaults to 'Next Page'
  • labelPage defaults to 'Page'. used on page number buttons (i.e. "Page 1", "Page 2", etc)
  • ariaLabel will label the pagination widget (defaults to 'Pagination')

Addresses parts of #333

@pi0
Copy link
Member

pi0 commented May 9, 2017

You rock 👍

@pi0 pi0 merged commit aa9426c into bootstrap-vue:master May 9, 2017
valexiev added a commit to valexiev/bootstrap-vue that referenced this pull request May 9, 2017
* upstream/master: (220 commits)
  [button-toolbar] docs (bootstrap-vue#368)
  ESLint
  New component b-button-toolbar (bootstrap-vue#367)
  [link] fix click event
  [docs] navbar styling
  Refactor link mixin
  [button-group] fix toolbar keynav (bootstrap-vue#366)
  [Docs] ScrollSpy directive JSFiddle
  [Link] Small fixes
  [link] Allow both router links and regular links to co-exist in same document (bootstrap-vue#365)
  [pagination] ARIA attributes + Keyboard navigation (bootstrap-vue#364)
  [dropdown-item] explicit component reference (bootstrap-vue#361)
  Additional ARIA on navs and dropdown (bootstrap-vue#358)
  ESLint
  [docs] ScrollSpy
  [scrollspy] SSR fix
  v0.15.6
  [modal] focusFirst timing tweak (bootstrap-vue#357)
  [scrollspy] documentation update
  [scrollspy] Documentation (bootstrap-vue#356)
  ...
@tmorehouse tmorehouse deleted the pagination-aria branch May 10, 2017 03:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants