@mozaic-ds/vue 0.8.2-beta.1 → 0.9.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mozaic-ds/vue",
3
- "version": "0.8.2-beta.1",
3
+ "version": "0.9.0",
4
4
  "scripts": {
5
5
  "serve": "vue-cli-service serve",
6
6
  "build": "vue-cli-service build ./src/index.js",
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <a v-if="href" :href="href" class="mc-button" :class="setClasses">
2
+ <a v-if="href" :href="href" class="mc-button" :class="setClasses" :aria-label="ariaLabel">
3
3
  <m-icon
4
4
  v-if="icon && iconPosition === 'left'"
5
5
  :id="`mc-button__${iconPosition}-icon-${id}`"
@@ -21,6 +21,7 @@
21
21
  class="mc-button"
22
22
  :disabled="disabled"
23
23
  :class="setClasses"
24
+ :aria-label="ariaLabel"
24
25
  @click="$emit('click', $event)"
25
26
  >
26
27
  <m-icon
@@ -120,6 +121,10 @@ export default {
120
121
  default: 'left',
121
122
  validator: (value) => ['left', 'right'].includes(value),
122
123
  },
124
+ ariaLabel: {
125
+ type: String,
126
+ default: null,
127
+ },
123
128
  },
124
129
 
125
130
  data() {
@@ -5,10 +5,12 @@
5
5
  theme="bordered"
6
6
  icon="ControlLess32"
7
7
  icon-position="left"
8
- aria-label="Decrement"
8
+ :aria-label="decrementAriaLabel"
9
9
  :aria-controls="id"
10
10
  :disabled="currentValue === valuemin"
11
11
  :size="small ? 's' : null"
12
+ tabindex="-1"
13
+ aria-hidden="true"
12
14
  @click="decrement()"
13
15
  />
14
16
 
@@ -18,12 +20,13 @@
18
20
  type="number"
19
21
  class="mc-quantity-selector__input"
20
22
  name="quantity-selector-input"
21
- aria-label="QuantitySelector"
22
- aria-valuenow="0"
23
+ :aria-label="inputAriaLabel"
24
+ :aria-valuenow="currentValue"
23
25
  :aria-valuemin="valuemin"
24
26
  :aria-valuemax="valuemax"
25
27
  :placeholder="placeholder"
26
28
  :size="small ? 's' : null"
29
+ role="spinbutton"
27
30
  @input="handle"
28
31
  />
29
32
 
@@ -32,10 +35,12 @@
32
35
  theme="bordered"
33
36
  icon="ControlMore32"
34
37
  icon-position="right"
35
- aria-label="Increment"
38
+ :aria-label="incrementAriaLabel"
36
39
  :aria-controls="id"
37
40
  :disabled="currentValue === valuemax"
38
41
  :size="small ? 's' : null"
42
+ tabindex="-1"
43
+ aria-hidden="true"
39
44
  @click="increment()"
40
45
  />
41
46
  </div>
@@ -62,6 +67,18 @@ export default {
62
67
  type: Number,
63
68
  default: 0,
64
69
  },
70
+ inputAriaLabel: {
71
+ type: String,
72
+ default: 'Quantity Selector',
73
+ },
74
+ decrementAriaLabel: {
75
+ type: String,
76
+ default: 'Decrement',
77
+ },
78
+ incrementAriaLabel: {
79
+ type: String,
80
+ default: 'Increment',
81
+ },
65
82
  valuemin: {
66
83
  type: Number,
67
84
  default: 1,