@gitlab/ui 32.52.0 → 32.53.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [32.53.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v32.52.0...v32.53.0) (2022-01-07)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **GlLoadingIcon:** Improve accessibility with role ([6bd4b30](https://gitlab.com/gitlab-org/gitlab-ui/commit/6bd4b30a386723477f302c42bddca55b454836d0))
|
|
7
|
+
|
|
1
8
|
# [32.52.0](https://gitlab.com/gitlab-org/gitlab-ui/compare/v32.51.3...v32.52.0) (2022-01-07)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -67,7 +67,7 @@ var script = {
|
|
|
67
67
|
const __vue_script__ = script;
|
|
68
68
|
|
|
69
69
|
/* template */
|
|
70
|
-
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c(_vm.rootElementType,{tag:"component",staticClass:"gl-spinner-container"},[_c('span',{staticClass:"align-text-bottom",class:_vm.cssClasses,attrs:{"aria-label":_vm.label}})])};
|
|
70
|
+
var __vue_render__ = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c(_vm.rootElementType,{tag:"component",staticClass:"gl-spinner-container",attrs:{"role":"status"}},[_c('span',{staticClass:"align-text-bottom",class:_vm.cssClasses,attrs:{"aria-label":_vm.label}})])};
|
|
71
71
|
var __vue_staticRenderFns__ = [];
|
|
72
72
|
|
|
73
73
|
/* style */
|
package/package.json
CHANGED
|
@@ -3,8 +3,8 @@ import LoadingIcon from './loading_icon.vue';
|
|
|
3
3
|
|
|
4
4
|
describe('loading icon component', () => {
|
|
5
5
|
let wrapper;
|
|
6
|
-
const createComponent = (propsData) => {
|
|
7
|
-
wrapper = shallowMount(LoadingIcon, { propsData });
|
|
6
|
+
const createComponent = ({ attrs, ...propsData } = {}) => {
|
|
7
|
+
wrapper = shallowMount(LoadingIcon, { propsData, attrs });
|
|
8
8
|
};
|
|
9
9
|
|
|
10
10
|
const baseCssClass = 'gl-spinner';
|
|
@@ -83,4 +83,19 @@ describe('loading icon component', () => {
|
|
|
83
83
|
expect(spinnerEl.attributes('aria-label')).toBe(label);
|
|
84
84
|
});
|
|
85
85
|
});
|
|
86
|
+
|
|
87
|
+
describe('role', () => {
|
|
88
|
+
it('should have default role value as status', () => {
|
|
89
|
+
createComponent();
|
|
90
|
+
|
|
91
|
+
expect(wrapper.attributes('role')).toBe('status');
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
it('should have role value as custom value passed', () => {
|
|
95
|
+
const role = 'dialog';
|
|
96
|
+
createComponent({ attrs: { role } });
|
|
97
|
+
|
|
98
|
+
expect(wrapper.attributes('role')).toBe(role);
|
|
99
|
+
});
|
|
100
|
+
});
|
|
86
101
|
});
|
|
@@ -63,7 +63,7 @@ export default {
|
|
|
63
63
|
};
|
|
64
64
|
</script>
|
|
65
65
|
<template>
|
|
66
|
-
<component :is="rootElementType" class="gl-spinner-container">
|
|
66
|
+
<component :is="rootElementType" class="gl-spinner-container" role="status">
|
|
67
67
|
<span :class="cssClasses" class="align-text-bottom" :aria-label="label"></span>
|
|
68
68
|
</component>
|
|
69
69
|
</template>
|