BS4/Bootstrap-Vue Accessibility recommendations
See original GitHub issueBootstrap V4 is addressing some of the accessibility issues: https://github.com/twbs/bootstrap/issues/22549, Of which bootstrap-vue has started to already address.
Here is little list of items that are complete or need work for aria and/or keyboard navigation (to be updated as we progress through them):
Components - ARIA / Keyboard Navigation
-
b-form-radio
input wrapped in label (which negates need forfor
on label) -
b-form-checkbox
input wrapped in label (which negates need forfor
on label) -
b-progress
ARIAprogress
attributes -
b-modal
attributesaria-labelledby
andaria-describedby
. Sectionroles
& semantic elements. (PR #247) -
b-modal
Focus first input/button on open (PR #247). Allow page author to specify input to be focused when opened via@shown
event (PR #378) -
b-modal
focus the modal content when opened -
b-tabs
&b-tab
attributesaria-controls
andaria-labelelledby
. Sectionroles
(PR #339) -
b-tabs
&b-tab
keyboard navigation (PR #339) -
b-alert
has ariarole="alert"
,aria-live
andaria-atomic
(PR #340) -
b-form-file
Needs focus styling in custom-file-input mode for keyboard users (PR #1033) -
b-form-fieldset
attributefor
when ID supplied on,form-control
. Hasrole="alert"
,aria-live
,aria-atomic
on feedback. andaria-describedby
(PR #340) -
b-breadcrumb
~should have role of navigation (PR #340)~ Addaria-current
to active crumb (PR #526) -
b-input-group
needsrole="group"
(PR #340) -
b-button-group
role="group"
, make new toolbar component (PR #367) -
b-button-toolbar
role="toolbar"
+ optional keyboard navigation (PR #367) -
b-nav
&b-nav-link
aria attributes (PR #358) -
b-dropdown
keyboard navigation (PR #274) -
b-nav-dropdown
aria-
attributes (PR #358) -
b-nav-dropdown
open on ENTER or SPACE (see Issue #348) (PR #349) -
b-nav-toggle
aria-
attributes (PR #358, #410, #411, #412) -
(leave as standard TAB key navigation)b-nav
&b-nav-link
keyboard navigation -
b-collapse
Reflect expanded/collapsed state on trigger element (PR #358 & #519) -
b-pagination
aria-[label|current|setsize|posinset]
attributes. (Note:aria-controls
should be set manually in the<b-pagination>
markup) (PR #364) -
b-pagination
keyboard navigation (PR #364 & #377) -
b-carousel
aria-[controls|label|current|setsize|posinset]
attributes androles
. (PR #380) -
b-carousel
keyboard left/right control (PR #380, #420) -
b-carousel
Pause slide scrolling onmouseenter
and resume onmouseout
. -
b-tooltip
aria-
attributes (aria-live, aria-describedby, etc -
b-popover
aria-
attributes (aria-live, aria-describedby, etc. Also needs ability to changerole
fromtooltip
topopover
ordialog
- Popovers can have some issues with regards to accessibility, especially for interactive popover content, and possibly should have a role other than
tooltip
(configurable). https://github.com/twbs/bootstrap/issues/18618
- Popovers can have some issues with regards to accessibility, especially for interactive popover content, and possibly should have a role other than
Directives
-
v-b-modal
return focus to open trigger element. -
v-b-toggle
attributesaria-controls
andaria-expanded
. (PR #519)
Documentation
- Create ARIA best practices for Bootstrap-Vue - sections added to each compoent
- Add documentation where needed
Issue Analytics
- State:
- Created 6 years ago
- Reactions:4
- Comments:35 (24 by maintainers)
Top Results From Across the Web
Accessibility | Reference - BootstrapVue
A brief overview of BootstrapVue's features and limitations for the creation of accessible content.
Read more >Accessibility - Bootstrap
A brief overview of Bootstrap's features and limitations for the creation of accessible content.
Read more >Vue Argon Dashboard BS4 - Creative Tim
Start your development with a free dashboard for Bootstrap 4 and Vue.js. ... states for colors, styles, hover, focus, that you can easily...
Read more >Installation - Laraform
Purchasing License; Creating User Access; Installing Vue Package ... file created for Bootstrap 4 @import "@laraform/laraform/src/themes/bs4/scss/theme";.
Read more >Bootstrap 4 Dropdown - examples & tutorial.
Google Material Design guidelines recommend the same approach. Accessibility. The WAI ARIA standard defines an actual role="menu" ...
Read more >Top Related Medium Post
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Ah, I see that
b-collapse
is not rendering the ID on it’s root div. I’ll create a quick PR for this.Thats because it does not exist. I suggest it should be aria-controls 😁