-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[tabs] Add in ARIA and keyboard navigation support #339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
pi0
merged 22 commits into
bootstrap-vue:master
from
tmorehouse:tmorehouse-tabs-navs-aria
May 5, 2017
Merged
[tabs] Add in ARIA and keyboard navigation support #339
pi0
merged 22 commits into
bootstrap-vue:master
from
tmorehouse:tmorehouse-tabs-navs-aria
May 5, 2017
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* Create form-input-static.vue New form-static input * Added form-input-static compoinent * Refactored static input Refactored to use the new `<b-form-input-static>` component * Switch to bFormInputStatic Updated child component var to bFormInputStatic to follow proper naming conventions * Removed lazyFormatter from static-input * Added trailing semi-colon To make CircleCI happy * Added missing 'this' * [nav-item] add dropdown class * Added <slot> for robustness * new b-form-input-static component (#292) * Create form-input-static.vue New form-static input * Added form-input-static compoinent * Refactored static input Refactored to use the new `<b-form-input-static>` component * Switch to bFormInputStatic Updated child component var to bFormInputStatic to follow proper naming conventions * Removed lazyFormatter from static-input * Added trailing semi-colon To make CircleCI happy * Added missing 'this' * Added <slot> for robustness * fixed missing `.vue` extension on import * Added missing extension on component import (#293) * Optimized import order in form-input.vue (#294) * Added missing extension on component import * Optimized import order
Resync with master
Resync with master
Resync with master
Resync with master
Resync with Master
Add ARIA IDs to the tab buttons if the tab has an id
If tab has an ID then generate a `controlledBy` id for ARIA accessibility
Prop buttonId allows user to specify the ID they would like on the tab controllers generated for the tab-panes.
Allows next() and prev() methods to skip over disabled tabs, by introducing a 3rd argument to setTab(index, force, offset). This allows the direction of travel to be passed as -1, 0, or +1 in the offset argument. Also fixes a bug where programmatically calling next() or prev() would stop if the next or previous tab was disabled
Some screen readers prefer the aria-expanded over aria-hidden (and vice versa).
Allows using SHIFT+LEFT/UP to go to first non-disabled tab Allows using SHIFT+RIGHT/DOWN to go to last non-disabled tab
33 tasks
I did merge blind without local tests :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Better ARIA referencing and roles for generated elements.
To enable full ARIA compliance, each
b-tab
must have a document uniqueid
assigned to them. Ifid
s are not supplied then only therole
s andaria-
states are assigned (partial ARIA compliance). If an optional document unique ID is assigned to propbuttonId
onb-tab
, it will be used as the tab controller'sid
, otherwise one is generated based on the suppliedb-tab
id
prop (or none if noid
). Theseid
s are required to let screen readers know whichtab
controller is controlling which tab-pane.This PR also allows keyboard navigation LEFT/UP to move to previous non-disabled tab, and RIGHT/DOWN to get to next non-disabled tab. using key modifier SHIFT with LEFT/UP or RIGHT/DOWN will move to the first or last (respectively) non-disabled tab.
As a side effect, this fixes a bug when programmatically calling
vm.prev()
orvm.next()
which, previously, wouldn't let you skip pastdisabled
tabs.Address parts of #333