mirror of
https://github.com/youzan/vant.git
synced 2025-10-20 10:44:59 +00:00
[improvement] Tab: improve accessibility
This commit is contained in:
@@ -51,14 +51,23 @@ export default sfc({
|
||||
|
||||
if (this.parent.animated) {
|
||||
return (
|
||||
<div class={bem('pane-wrapper', { inactive: !this.selected })}>
|
||||
<div
|
||||
role="tabpanel"
|
||||
aria-hidden={!this.selected}
|
||||
class={bem('pane-wrapper', { inactive: !this.selected })}
|
||||
>
|
||||
<div class={bem('pane')}>{Content}</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div vShow={this.selected} class={bem('pane')}>
|
||||
<div
|
||||
vShow={this.selected}
|
||||
role="tabpanel"
|
||||
class={bem('pane')}
|
||||
aria-hidden={!this.selected}
|
||||
>
|
||||
{Content}
|
||||
</div>
|
||||
);
|
||||
|
Reference in New Issue
Block a user