mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
[improvement] GoodsAction: improve accessibility
This commit is contained in:
parent
6cc14d8651
commit
06cf2f3f57
@ -11,6 +11,7 @@
|
||||
- Slider
|
||||
- Switch
|
||||
- NoticeBar
|
||||
- GoodsAction
|
||||
|
||||
##### ImagePreview
|
||||
|
||||
|
@ -28,7 +28,12 @@ function GoodsActionIcon(
|
||||
}
|
||||
|
||||
return (
|
||||
<div class={[bem(), 'van-hairline']} onClick={onClick} {...inherit(ctx)}>
|
||||
<div
|
||||
role="button"
|
||||
class={[bem(), 'van-hairline']}
|
||||
onClick={onClick}
|
||||
{...inherit(ctx)}
|
||||
>
|
||||
<Icon
|
||||
class={[bem('icon'), props.iconClass]}
|
||||
tag="div"
|
||||
|
@ -4,12 +4,12 @@ exports[`renders demo correctly 1`] = `
|
||||
<div>
|
||||
<div>
|
||||
<div class="van-goods-action">
|
||||
<div class="van-goods-action-icon van-hairline">
|
||||
<div role="button" class="van-goods-action-icon van-hairline">
|
||||
<div class="van-icon van-icon-chat-o van-goods-action-icon__icon">
|
||||
<!---->
|
||||
</div>客服
|
||||
</div>
|
||||
<div class="van-goods-action-icon van-hairline">
|
||||
<div role="button" class="van-goods-action-icon van-hairline">
|
||||
<div class="van-icon van-icon-cart-o van-goods-action-icon__icon">
|
||||
<!---->
|
||||
</div>购物车
|
||||
@ -18,17 +18,17 @@ exports[`renders demo correctly 1`] = `
|
||||
</div>
|
||||
<div>
|
||||
<div class="van-goods-action">
|
||||
<div class="van-goods-action-icon van-hairline">
|
||||
<div role="button" class="van-goods-action-icon van-hairline">
|
||||
<div class="van-icon van-icon-chat-o van-goods-action-icon__icon">
|
||||
<!---->
|
||||
</div>客服
|
||||
</div>
|
||||
<div class="van-goods-action-icon van-hairline">
|
||||
<div role="button" class="van-goods-action-icon van-hairline">
|
||||
<div class="van-icon van-icon-cart-o van-goods-action-icon__icon">
|
||||
<div class="van-info">5</div>
|
||||
</div>购物车
|
||||
</div>
|
||||
<div class="van-goods-action-icon van-hairline">
|
||||
<div role="button" class="van-goods-action-icon van-hairline">
|
||||
<div class="van-icon van-icon-shop-o van-goods-action-icon__icon">
|
||||
<!---->
|
||||
</div>店铺
|
||||
|
@ -3,7 +3,7 @@
|
||||
exports[`Button render default slot 1`] = `<button class="van-button van-button--default van-button--large van-button--square van-goods-action-button"><span class="van-button__text">Default Content</span></button>`;
|
||||
|
||||
exports[`Icon render default slot 1`] = `
|
||||
<div class="van-goods-action-icon van-hairline">
|
||||
<div role="button" class="van-goods-action-icon van-hairline">
|
||||
<div class="van-icon van-icon-undefined van-goods-action-icon__icon">
|
||||
<!---->
|
||||
</div>Default Content
|
||||
|
Loading…
x
Reference in New Issue
Block a user