mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-05-26 00:09:15 +08:00
feat(Popup): improvement accessibility of close icon (#4516)
This commit is contained in:
parent
fa5bf00ff1
commit
92f5ac9143
@ -77,7 +77,13 @@ export default createComponent({
|
|||||||
>
|
>
|
||||||
{this.slots()}
|
{this.slots()}
|
||||||
{this.closeable && (
|
{this.closeable && (
|
||||||
<Icon name={this.closeIcon} class={bem('close-icon', this.closeIconPosition)} onClick={this.close} />
|
<Icon
|
||||||
|
role="button"
|
||||||
|
tabindex="0"
|
||||||
|
name={this.closeIcon}
|
||||||
|
class={bem('close-icon', this.closeIconPosition)}
|
||||||
|
onClick={this.close}
|
||||||
|
/>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</transition>
|
</transition>
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
exports[`close-icon prop 1`] = `
|
exports[`close-icon prop 1`] = `
|
||||||
<div class="van-popup van-popup--center" name="van-fade"><i class="van-icon van-icon-success van-popup__close-icon van-popup__close-icon--top-right">
|
<div class="van-popup van-popup--center" name="van-fade"><i role="button" tabindex="0" class="van-icon van-icon-success van-popup__close-icon van-popup__close-icon--top-right">
|
||||||
<!----></i></div>
|
<!----></i></div>
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user