Skip to content

Commit e139b2c

Browse files
authored
Merge branch 'dev' into patch-1
2 parents d71b6db + 9b1edc9 commit e139b2c

21 files changed

+564
-344
lines changed

.bundlewatch.config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
},
4343
{
4444
"path": "./dist/bootstrap-vue.common.js",
45-
"maxSize": "355 kB"
45+
"maxSize": "360 kB"
4646
},
4747
{
4848
"path": "./dist/bootstrap-vue.common.min.js",

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
uses: actions/checkout@v2
2525

2626
- name: Set Node.js version
27-
uses: actions/setup-node@v2.1.5
27+
uses: actions/setup-node@v2.5.0
2828
with:
2929
node-version: ${{ matrix.node }}
3030

@@ -33,7 +33,7 @@ jobs:
3333
run: echo "::set-output name=dir::$(yarn cache dir)"
3434

3535
- name: Cache node_modules
36-
uses: actions/cache@v2.1.6
36+
uses: actions/cache@v2.1.7
3737
with:
3838
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
3939
key: ${{ matrix.os }}-node-v${{ matrix.node }}-yarn-${{ hashFiles('**/yarn.lock') }}

.github/workflows/test.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
uses: actions/checkout@v2
2525

2626
- name: Set Node.js version
27-
uses: actions/setup-node@v2.1.5
27+
uses: actions/setup-node@v2.5.0
2828
with:
2929
node-version: ${{ matrix.node }}
3030

@@ -33,7 +33,7 @@ jobs:
3333
run: echo "::set-output name=dir::$(yarn cache dir)"
3434

3535
- name: Cache node_modules
36-
uses: actions/cache@v2.1.6
36+
uses: actions/cache@v2.1.7
3737
with:
3838
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
3939
key: ${{ matrix.os }}-node-v${{ matrix.node }}-yarn-${{ hashFiles('**/yarn.lock') }}
@@ -61,7 +61,7 @@ jobs:
6161
uses: actions/checkout@v2
6262

6363
- name: Set Node.js version
64-
uses: actions/setup-node@v2.1.5
64+
uses: actions/setup-node@v2.5.0
6565
with:
6666
node-version: ${{ matrix.node }}
6767

@@ -70,7 +70,7 @@ jobs:
7070
run: echo "::set-output name=dir::$(yarn cache dir)"
7171

7272
- name: Cache node_modules
73-
uses: actions/cache@v2.1.6
73+
uses: actions/cache@v2.1.7
7474
with:
7575
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
7676
key: ${{ matrix.os }}-node-v${{ matrix.node }}-yarn-${{ hashFiles('**/yarn.lock') }}
@@ -98,7 +98,7 @@ jobs:
9898
uses: actions/checkout@v2
9999

100100
- name: Set Node.js version
101-
uses: actions/setup-node@v2.1.5
101+
uses: actions/setup-node@v2.5.0
102102
with:
103103
node-version: ${{ matrix.node }}
104104

@@ -107,7 +107,7 @@ jobs:
107107
run: echo "::set-output name=dir::$(yarn cache dir)"
108108

109109
- name: Cache node_modules
110-
uses: actions/cache@v2.1.6
110+
uses: actions/cache@v2.1.7
111111
with:
112112
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
113113
key: ${{ matrix.os }}-node-v${{ matrix.node }}-yarn-${{ hashFiles('**/yarn.lock') }}
@@ -123,7 +123,7 @@ jobs:
123123
run: yarn run test:unit --coverage --maxWorkers=2
124124

125125
- name: CodeCov
126-
uses: codecov/codecov-action@v1
126+
uses: codecov/codecov-action@v2.1.0
127127
with:
128128
token: ${{ secrets.CODECOV_TOKEN }}
129129
flags: unittests

docs/common-props.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@
7474
"exactActiveClass": {
7575
"description": "<router-link> prop: Configure the active CSS class applied when the link is active with exact match. Typically you will want to set this to class name 'active'"
7676
},
77+
"exactPath": {
78+
"description": "<router-link> prop: Allows matching only using the path section of the url, effectively ignoring the query and the hash sections"
79+
},
80+
"exactPathActiveClass": {
81+
"description": "<router-link> prop: Configure the active CSS class applied when the link is active with exact path match. Typically you will want to set this to class name 'active'"
82+
},
7783
"fade": {
7884
"description": "When set to `true`, enables the fade animation/transition on the component"
7985
},

docs/markdown/intro/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ the 2 `@import`'s at the end:
157157
$body-bg: #000;
158158
$body-color: #111;
159159

160-
// Then import Bootstrap an BootstrapVue SCSS files (order is important)
160+
// Then import Bootstrap and BootstrapVue SCSS files (order is important)
161161
@import 'node_modules/bootstrap/scss/bootstrap.scss';
162162
@import 'node_modules/bootstrap-vue/src/index.scss';
163163
```

docs/markdown/reference/router-links/README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,34 @@ With components that support router links (have a `to` prop), you will want to s
149149
`'active'` (or a space separated string that includes `'active'`) to apply Bootstrap's active
150150
styling on the component when the current route matches the `to` prop.
151151

152+
### `exact-path`
153+
154+
- type: `boolean`
155+
- default: `false`
156+
- availability: Vue Router 3.5.0+
157+
158+
Allows matching only using the `path` section of the url, effectively ignoring the `query` and the
159+
`hash` sections.
160+
161+
```html
162+
<!-- this link will also be active at `/search?page=2` or `/search#filters` -->
163+
<router-link to="/search" exact-path> </router-link>
164+
```
165+
166+
### `exact-path-active-class`
167+
168+
- type: `string`
169+
- default: `'router-link-exact-path-active'`
170+
- availability: Vue Router 3.5.0+
171+
172+
Configure the active CSS class applied when the link is active with exact path match. Note the
173+
default value can also be configured globally via the `linkExactPathActiveClass` router constructor
174+
option.
175+
176+
With components that support router links (have a `to` prop), you will want to set this to the class
177+
`'active'` (or a space separated string that includes `'active'`) to apply Bootstrap's active
178+
styling on the component when the current route matches the `to` prop.
179+
152180
## Nuxt.js specific router link props
153181

154182
When BootstrapVue detects that your app is running under [Nuxt.js](https://nuxtjs.org), it will

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@
8888
},
8989
"devDependencies": {
9090
"@babel/cli": "^7.13.16",
91-
"@babel/core": "^7.14.0",
91+
"@babel/core": "^7.16.5",
9292
"@babel/plugin-transform-modules-commonjs": "^7.14.0",
93-
"@babel/plugin-transform-runtime": "^7.13.15",
93+
"@babel/plugin-transform-runtime": "^7.16.5",
9494
"@babel/preset-env": "^7.14.2",
9595
"@babel/standalone": "^7.14.1",
9696
"@nuxt/content": "^1.14.0",
@@ -116,7 +116,7 @@
116116
"eslint-config-prettier": "^8.3.0",
117117
"eslint-config-standard": "^16.0.2",
118118
"eslint-config-vue": "^2.0.2",
119-
"eslint-plugin-import": "^2.22.1",
119+
"eslint-plugin-import": "^2.25.3",
120120
"eslint-plugin-jest": "^24.3.6",
121121
"eslint-plugin-markdown": "^2.1.0",
122122
"eslint-plugin-node": "^11.1.0",
@@ -143,7 +143,7 @@
143143
"rollup-plugin-babel": "^4.4.0",
144144
"rollup-plugin-commonjs": "^10.1.0",
145145
"rollup-plugin-node-resolve": "^5.2.0",
146-
"sass": "^1.32.12",
146+
"sass": "^1.45.0",
147147
"sass-loader": "^10.1.1",
148148
"standard-version": "^9.3.0",
149149
"terser": "^5.7.0",

src/components/dropdown/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -664,7 +664,8 @@ Providing a unique `id` prop ensures ARIA compliance by automatically adding the
664664
`aria-*` attributes in the rendered markup.
665665

666666
The default ARIA role is set to `menu`, but you can change this default to another role (such as
667-
`navigation`) via the `role` prop, depending on your user case.
667+
`navigation`) via the `role` prop, depending on your user case. The `role` prop value will be used
668+
to determine `aria-haspopup` attribute for the toggle button.
668669

669670
When a menu item doesn't trigger navigation, it is recommended to use the `<b-dropdown-item-button>`
670671
sub-component (which is not announced as a link) instead of `<b-dropdown-item>` (which is presented

src/components/dropdown/dropdown.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ export const BDropdown = /*#__PURE__*/ Vue.extend({
140140
$buttonChildren = [h('span', { class: ['sr-only'] }, [this.toggleText])]
141141
buttonContentDomProps = {}
142142
}
143+
const ariaHasPopupRoles = ['menu', 'listbox', 'tree', 'grid', 'dialog']
143144

144145
const $toggle = h(
145146
BButton,
@@ -151,7 +152,7 @@ export const BDropdown = /*#__PURE__*/ Vue.extend({
151152
...this.toggleAttrs,
152153
// Must have attributes
153154
id: this.safeId('_BV_toggle_'),
154-
'aria-haspopup': 'true',
155+
'aria-haspopup': ariaHasPopupRoles.includes(role) ? role : 'false',
155156
'aria-expanded': toString(visible)
156157
},
157158
props: {

src/components/dropdown/dropdown.spec.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ describe('dropdown', () => {
6363
expect($button.classes()).toContain('dropdown-toggle')
6464
expect($button.classes().length).toBe(3)
6565
expect($button.attributes('aria-haspopup')).toBeDefined()
66-
expect($button.attributes('aria-haspopup')).toEqual('true')
66+
expect($button.attributes('aria-haspopup')).toEqual('menu')
6767
expect($button.attributes('aria-expanded')).toBeDefined()
6868
expect($button.attributes('aria-expanded')).toEqual('false')
6969
expect($button.attributes('id')).toBeDefined()
@@ -125,7 +125,7 @@ describe('dropdown', () => {
125125
expect($toggle.classes()).toContain('dropdown-toggle-split')
126126
expect($toggle.classes().length).toBe(4)
127127
expect($toggle.attributes('aria-haspopup')).toBeDefined()
128-
expect($toggle.attributes('aria-haspopup')).toEqual('true')
128+
expect($toggle.attributes('aria-haspopup')).toEqual('menu')
129129
expect($toggle.attributes('aria-expanded')).toBeDefined()
130130
expect($toggle.attributes('aria-expanded')).toEqual('false')
131131
expect($toggle.attributes('id')).toBeDefined()
@@ -551,7 +551,7 @@ describe('dropdown', () => {
551551
expect($dropdown.vm).toBeDefined()
552552

553553
expect($toggle.attributes('aria-haspopup')).toBeDefined()
554-
expect($toggle.attributes('aria-haspopup')).toEqual('true')
554+
expect($toggle.attributes('aria-haspopup')).toEqual('menu')
555555
expect($toggle.attributes('aria-expanded')).toBeDefined()
556556
expect($toggle.attributes('aria-expanded')).toEqual('false')
557557
expect($dropdown.classes()).not.toContain('show')
@@ -564,7 +564,7 @@ describe('dropdown', () => {
564564
await waitNT(wrapper.vm)
565565

566566
expect($toggle.attributes('aria-haspopup')).toBeDefined()
567-
expect($toggle.attributes('aria-haspopup')).toEqual('true')
567+
expect($toggle.attributes('aria-haspopup')).toEqual('menu')
568568
expect($toggle.attributes('aria-expanded')).toBeDefined()
569569
expect($toggle.attributes('aria-expanded')).toEqual('true')
570570
expect($dropdown.classes()).toContain('show')
@@ -754,7 +754,7 @@ describe('dropdown', () => {
754754
const $dropdown = wrapper.find('.dropdown')
755755

756756
expect($toggle.attributes('aria-haspopup')).toBeDefined()
757-
expect($toggle.attributes('aria-haspopup')).toEqual('true')
757+
expect($toggle.attributes('aria-haspopup')).toEqual('menu')
758758
expect($toggle.attributes('aria-expanded')).toBeDefined()
759759
expect($toggle.attributes('aria-expanded')).toEqual('false')
760760
expect($dropdown.classes()).not.toContain('show')
@@ -765,7 +765,7 @@ describe('dropdown', () => {
765765
expect(wrapper.emitted('show')).toBeDefined()
766766
expect(wrapper.emitted('show').length).toBe(1)
767767
expect($toggle.attributes('aria-haspopup')).toBeDefined()
768-
expect($toggle.attributes('aria-haspopup')).toEqual('true')
768+
expect($toggle.attributes('aria-haspopup')).toEqual('menu')
769769
expect($toggle.attributes('aria-expanded')).toBeDefined()
770770
expect($toggle.attributes('aria-expanded')).toEqual('false')
771771
expect($dropdown.classes()).not.toContain('show')
@@ -777,7 +777,7 @@ describe('dropdown', () => {
777777
expect(wrapper.emitted('show')).toBeDefined()
778778
expect(wrapper.emitted('show').length).toBe(2)
779779
expect($toggle.attributes('aria-haspopup')).toBeDefined()
780-
expect($toggle.attributes('aria-haspopup')).toEqual('true')
780+
expect($toggle.attributes('aria-haspopup')).toEqual('menu')
781781
expect($toggle.attributes('aria-expanded')).toBeDefined()
782782
expect($toggle.attributes('aria-expanded')).toEqual('true')
783783
expect($dropdown.classes()).toContain('show')

0 commit comments

Comments
 (0)