Skip to content

Commit eeba07a

Browse files
authored
Update form-spinbutton.js
1 parent 8e26239 commit eeba07a

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/components/form-spinbutton/form-spinbutton.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ export const BFormSpinbutton = /*#__PURE__*/ Vue.extend({
346346
const hasValue = !isNull(value)
347347
const formatter = isFunction(this.formatterFn) ? this.formatterFn : this.defaultFormatter
348348

349-
const makeButton = (stepper, label, IconCmp, keyRef) => {
349+
const makeButton = (stepper, label, IconCmp, keyRef, shortcut) => {
350350
const $icon = h(IconCmp, {
351351
props: { scale: this.hasFocus ? 1.5 : 1.25 },
352352
attrs: { 'aria-hidden': 'true' }
@@ -368,7 +368,8 @@ export const BFormSpinbutton = /*#__PURE__*/ Vue.extend({
368368
type: 'button',
369369
disabled: isDisabled || isReadonly,
370370
'aria-controls': idSpin,
371-
'aria-label': label || null
371+
'aria-label': label || null,
372+
'aria-shortcutkeys': shortcut || null
372373
},
373374
on: {
374375
mousedown: handler,
@@ -378,8 +379,8 @@ export const BFormSpinbutton = /*#__PURE__*/ Vue.extend({
378379
[h('div', {}, [$icon])]
379380
)
380381
}
381-
const $increment = makeButton(this.stepUp, this.labelIncrement, BIconPlus, 'inc')
382-
const $decrement = makeButton(this.stepDown, this.labelDecrement, BIconDash, 'dec')
382+
const $increment = makeButton(this.stepUp, this.labelIncrement, BIconPlus, 'inc'. 'ArrowUp')
383+
const $decrement = makeButton(this.stepDown, this.labelDecrement, BIconDash, 'dec', 'ArrowDown')
383384

384385
let $hidden = h()
385386
if (this.name) {

0 commit comments

Comments
 (0)