mirror of
https://github.com/youzan/vant.git
synced 2025-10-16 08:00:34 +00:00
feat(Stepper): add aria-disabled for a11y (#9877)
This commit is contained in:
@@ -276,6 +276,7 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
>
|
||||
<button type="button"
|
||||
class="van-stepper__minus van-stepper__minus--disabled"
|
||||
aria-disabled="true"
|
||||
>
|
||||
</button>
|
||||
<input type="text"
|
||||
|
@@ -297,6 +297,7 @@ export default defineComponent({
|
||||
bem('minus', { disabled: minusDisabled.value }),
|
||||
{ [HAPTICS_FEEDBACK]: !minusDisabled.value },
|
||||
]}
|
||||
aria-disabled={minusDisabled.value || undefined}
|
||||
{...createListeners('minus')}
|
||||
/>
|
||||
<input
|
||||
@@ -328,6 +329,7 @@ export default defineComponent({
|
||||
bem('plus', { disabled: plusDisabled.value }),
|
||||
{ [HAPTICS_FEEDBACK]: !plusDisabled.value },
|
||||
]}
|
||||
aria-disabled={plusDisabled.value || undefined}
|
||||
{...createListeners('plus')}
|
||||
/>
|
||||
</div>
|
||||
|
@@ -14,6 +14,7 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
>
|
||||
<button type="button"
|
||||
class="van-stepper__minus van-stepper__minus--disabled"
|
||||
aria-disabled="true"
|
||||
>
|
||||
</button>
|
||||
<input type="text"
|
||||
@@ -43,6 +44,7 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
>
|
||||
<button type="button"
|
||||
class="van-stepper__minus van-stepper__minus--disabled"
|
||||
aria-disabled="true"
|
||||
>
|
||||
</button>
|
||||
<input type="text"
|
||||
@@ -72,6 +74,7 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
>
|
||||
<button type="button"
|
||||
class="van-stepper__minus van-stepper__minus--disabled"
|
||||
aria-disabled="true"
|
||||
>
|
||||
</button>
|
||||
<input type="text"
|
||||
@@ -101,6 +104,7 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
>
|
||||
<button type="button"
|
||||
class="van-stepper__minus van-stepper__minus--disabled"
|
||||
aria-disabled="true"
|
||||
>
|
||||
</button>
|
||||
<input type="tel"
|
||||
@@ -130,6 +134,7 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
>
|
||||
<button type="button"
|
||||
class="van-stepper__minus van-stepper__minus--disabled"
|
||||
aria-disabled="true"
|
||||
>
|
||||
</button>
|
||||
<input type="text"
|
||||
@@ -143,6 +148,7 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
>
|
||||
<button type="button"
|
||||
class="van-stepper__plus van-stepper__plus--disabled"
|
||||
aria-disabled="true"
|
||||
>
|
||||
</button>
|
||||
</div>
|
||||
@@ -160,6 +166,7 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
>
|
||||
<button type="button"
|
||||
class="van-stepper__minus van-stepper__minus--disabled"
|
||||
aria-disabled="true"
|
||||
>
|
||||
</button>
|
||||
<input type="text"
|
||||
@@ -190,6 +197,7 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
>
|
||||
<button type="button"
|
||||
class="van-stepper__minus van-stepper__minus--disabled"
|
||||
aria-disabled="true"
|
||||
>
|
||||
</button>
|
||||
<input type="text"
|
||||
@@ -220,6 +228,7 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<button type="button"
|
||||
style="width: 32px; height: 32px;"
|
||||
class="van-stepper__minus van-stepper__minus--disabled"
|
||||
aria-disabled="true"
|
||||
>
|
||||
</button>
|
||||
<input type="text"
|
||||
@@ -251,6 +260,7 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
>
|
||||
<button type="button"
|
||||
class="van-stepper__minus van-stepper__minus--disabled"
|
||||
aria-disabled="true"
|
||||
>
|
||||
</button>
|
||||
<input type="text"
|
||||
@@ -281,6 +291,7 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<button type="button"
|
||||
style="width: 22px; height: 22px;"
|
||||
class="van-stepper__minus van-stepper__minus--disabled"
|
||||
aria-disabled="true"
|
||||
>
|
||||
</button>
|
||||
<input type="text"
|
||||
|
@@ -6,6 +6,7 @@ exports[`should disable buttons and input when using disabled prop 1`] = `
|
||||
>
|
||||
<button type="button"
|
||||
class="van-stepper__minus van-stepper__minus--disabled"
|
||||
aria-disabled="true"
|
||||
>
|
||||
</button>
|
||||
<input type="text"
|
||||
@@ -19,6 +20,7 @@ exports[`should disable buttons and input when using disabled prop 1`] = `
|
||||
>
|
||||
<button type="button"
|
||||
class="van-stepper__plus van-stepper__plus--disabled"
|
||||
aria-disabled="true"
|
||||
>
|
||||
</button>
|
||||
</div>
|
||||
@@ -31,6 +33,7 @@ exports[`should update input height and button size when using button-size prop
|
||||
<button type="button"
|
||||
style="width: 2rem; height: 2rem;"
|
||||
class="van-stepper__minus van-stepper__minus--disabled"
|
||||
aria-disabled="true"
|
||||
>
|
||||
</button>
|
||||
<input type="text"
|
||||
|
Reference in New Issue
Block a user