mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-05 19:41:42 +08:00
feat(Stepper): add group role for a11y (#9876)
This commit is contained in:
parent
1ac48d12b8
commit
35fa1492c3
@ -271,7 +271,9 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
<div class="van-cell__value van-field__value">
|
||||
<div class="van-field__body">
|
||||
<div class="van-field__control van-field__control--custom">
|
||||
<div class="van-stepper">
|
||||
<div role="group"
|
||||
class="van-stepper"
|
||||
>
|
||||
<button type="button"
|
||||
class="van-stepper__minus van-stepper__minus--disabled"
|
||||
>
|
||||
|
@ -288,7 +288,7 @@ export default defineComponent({
|
||||
useCustomFieldValue(() => props.modelValue);
|
||||
|
||||
return () => (
|
||||
<div class={bem([props.theme])}>
|
||||
<div role="group" class={bem([props.theme])}>
|
||||
<button
|
||||
v-show={props.showMinus}
|
||||
type="button"
|
||||
|
@ -9,7 +9,9 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
<div class="van-cell__value">
|
||||
<div class="van-stepper">
|
||||
<div role="group"
|
||||
class="van-stepper"
|
||||
>
|
||||
<button type="button"
|
||||
class="van-stepper__minus van-stepper__minus--disabled"
|
||||
>
|
||||
@ -36,7 +38,9 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
<div class="van-cell__value">
|
||||
<div class="van-stepper">
|
||||
<div role="group"
|
||||
class="van-stepper"
|
||||
>
|
||||
<button type="button"
|
||||
class="van-stepper__minus van-stepper__minus--disabled"
|
||||
>
|
||||
@ -63,7 +67,9 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
<div class="van-cell__value">
|
||||
<div class="van-stepper">
|
||||
<div role="group"
|
||||
class="van-stepper"
|
||||
>
|
||||
<button type="button"
|
||||
class="van-stepper__minus van-stepper__minus--disabled"
|
||||
>
|
||||
@ -90,7 +96,9 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
<div class="van-cell__value">
|
||||
<div class="van-stepper">
|
||||
<div role="group"
|
||||
class="van-stepper"
|
||||
>
|
||||
<button type="button"
|
||||
class="van-stepper__minus van-stepper__minus--disabled"
|
||||
>
|
||||
@ -117,7 +125,9 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
<div class="van-cell__value">
|
||||
<div class="van-stepper">
|
||||
<div role="group"
|
||||
class="van-stepper"
|
||||
>
|
||||
<button type="button"
|
||||
class="van-stepper__minus van-stepper__minus--disabled"
|
||||
>
|
||||
@ -145,7 +155,9 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
<div class="van-cell__value">
|
||||
<div class="van-stepper">
|
||||
<div role="group"
|
||||
class="van-stepper"
|
||||
>
|
||||
<button type="button"
|
||||
class="van-stepper__minus van-stepper__minus--disabled"
|
||||
>
|
||||
@ -173,7 +185,9 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
<div class="van-cell__value">
|
||||
<div class="van-stepper">
|
||||
<div role="group"
|
||||
class="van-stepper"
|
||||
>
|
||||
<button type="button"
|
||||
class="van-stepper__minus van-stepper__minus--disabled"
|
||||
>
|
||||
@ -200,7 +214,9 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
<div class="van-cell__value">
|
||||
<div class="van-stepper">
|
||||
<div role="group"
|
||||
class="van-stepper"
|
||||
>
|
||||
<button type="button"
|
||||
style="width: 32px; height: 32px;"
|
||||
class="van-stepper__minus van-stepper__minus--disabled"
|
||||
@ -230,7 +246,9 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
<div class="van-cell__value">
|
||||
<div class="van-stepper">
|
||||
<div role="group"
|
||||
class="van-stepper"
|
||||
>
|
||||
<button type="button"
|
||||
class="van-stepper__minus van-stepper__minus--disabled"
|
||||
>
|
||||
@ -257,7 +275,9 @@ exports[`should render demo and match snapshot 1`] = `
|
||||
</span>
|
||||
</div>
|
||||
<div class="van-cell__value">
|
||||
<div class="van-stepper van-stepper--round">
|
||||
<div role="group"
|
||||
class="van-stepper van-stepper--round"
|
||||
>
|
||||
<button type="button"
|
||||
style="width: 22px; height: 22px;"
|
||||
class="van-stepper__minus van-stepper__minus--disabled"
|
||||
|
@ -1,7 +1,9 @@
|
||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`should disable buttons and input when using disabled prop 1`] = `
|
||||
<div class="van-stepper">
|
||||
<div role="group"
|
||||
class="van-stepper"
|
||||
>
|
||||
<button type="button"
|
||||
class="van-stepper__minus van-stepper__minus--disabled"
|
||||
>
|
||||
@ -23,7 +25,9 @@ exports[`should disable buttons and input when using disabled prop 1`] = `
|
||||
`;
|
||||
|
||||
exports[`should update input height and button size when using button-size prop 1`] = `
|
||||
<div class="van-stepper">
|
||||
<div role="group"
|
||||
class="van-stepper"
|
||||
>
|
||||
<button type="button"
|
||||
style="width: 2rem; height: 2rem;"
|
||||
class="van-stepper__minus van-stepper__minus--disabled"
|
||||
|
Loading…
x
Reference in New Issue
Block a user