fix(v-b-modal): open modal using ENTER key on non-button elements for A11Y#4364
Merged
tmorehouse merged 4 commits intobootstrap-vue:devfrom Nov 9, 2019
markhalliwell:patch-1
Merged
fix(v-b-modal): open modal using ENTER key on non-button elements for A11Y#4364tmorehouse merged 4 commits intobootstrap-vue:devfrom markhalliwell:patch-1
ENTER key on non-button elements for A11Y#4364tmorehouse merged 4 commits intobootstrap-vue:devfrom
markhalliwell:patch-1
Conversation
tmorehouse
reviewed
Nov 9, 2019
Codecov Report
@@ Coverage Diff @@
## dev #4364 +/- ##
==========================================
+ Coverage 99.91% 99.91% +<.01%
==========================================
Files 238 238
Lines 4598 4599 +1
Branches 1292 1292
==========================================
+ Hits 4594 4595 +1
Misses 3 3
Partials 1 1
Continue to review full report at Codecov.
|
ENTER key on non-button elements
Member
|
@MarkCarver Thanks! I've tweaked the code a bit to use KeyCode constants utility, as well as added in two unit tests to ensure both ENTER and SPACE triggers work. |
tmorehouse
approved these changes
Nov 9, 2019
ENTER key on non-button elementsENTER key on non-button elements for A11Y
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
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.
Describe the PR
When the
v-b-modaldirective is used on non-link elements (a), users can only open it using the spacebar. This adds inconsistency where other implementations (because they're link elements) can be opened using theEnterkey.From https://www.w3.org/WAI/GL/wiki/Making_actions_keyboard_accessible_by_using_keyboard_event_handlers_with_WAI-ARIA_controls#Example_1:_Using_Space_to_activate_a_button:
PR checklist
What kind of change does this PR introduce? (check at least one)
Does this PR introduce a breaking change? (check one)
The PR fulfills these requirements:
devbranch, not themasterbranch[...] (fixes #xxx[,#xxx]), where "xxx" is the issue number)fix(alert): not alerting during SSR render,docs(badge): update pill examples, fix typos,chore: fix typo in README, etc). This is very important, as theCHANGELOGis generated from these messages.If new features/enhancement/fixes are added or changed:
package.jsonfor slot and event changes)If adding a new feature, or changing the functionality of an existing feature, the PR's
description above includes: