mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-05-20 21:39:15 +08:00
feat(Popup): add role and tabindex for a11y (#10894)
* feat(Popup): add role and tabindex for a11y * Update Popup.tsx Co-authored-by: neverland <jait.chen@foxmail.com>
This commit is contained in:
parent
b117e21dc4
commit
ed5ea225ca
@ -144,6 +144,8 @@ export default defineComponent({
|
|||||||
zIndex={zIndex.value}
|
zIndex={zIndex.value}
|
||||||
duration={props.duration}
|
duration={props.duration}
|
||||||
customStyle={props.overlayStyle}
|
customStyle={props.overlayStyle}
|
||||||
|
role={props.closeOnClickOverlay ? 'button' : undefined}
|
||||||
|
tabindex={props.closeOnClickOverlay ? 0 : undefined}
|
||||||
onClick={onClickOverlay}
|
onClick={onClickOverlay}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
@ -185,6 +187,8 @@ export default defineComponent({
|
|||||||
v-show={props.show}
|
v-show={props.show}
|
||||||
ref={popupRef}
|
ref={popupRef}
|
||||||
style={style.value}
|
style={style.value}
|
||||||
|
role="dialog"
|
||||||
|
tabindex={0}
|
||||||
class={[
|
class={[
|
||||||
bem({
|
bem({
|
||||||
round,
|
round,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user