Skip to content

Commit

Permalink
feat(image-viewer): accessibility
Browse files Browse the repository at this point in the history
  • Loading branch information
yaonianhan committed Aug 30, 2023
1 parent 351de08 commit fe38f85
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 19 deletions.
7 changes: 0 additions & 7 deletions src/image-viewer/image-viewer.less
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,6 @@
top: 0;
width: 100%;
height: 100%;
&-bottom {
position: absolute;
bottom: 0;
height: 10%;
width: 100%;
z-index: 1001;
}
}

&__content {
Expand Down
14 changes: 2 additions & 12 deletions src/image-viewer/image-viewer.wxml
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
<import src="../common/template/icon.wxml" />
<wxs src="../common/utils.wxs" module="_" />
<!-- TODO:
ARIA:
1. siwper control
-->
<view
wx:if="{{visible}}"
id="{{classPrefix}}"
Expand All @@ -19,15 +15,8 @@ ARIA:
data-source="overlay"
bind:tap="onClose"
style="{{ 'background-color: ' + backgroundColor }}"
aria-hidden="{{true}}"
/>
<view
wx:if="{{!_closeBtn}}"
class="{{classPrefix}}__mask-bottom"
data-type="tap"
bind:tap="onClose"
aria-role="button"
aria-label="关闭图片查看器"
aria-label="关闭"
/>
<block wx:if="{{images && images.length}}">
<view class="{{classPrefix}}__content">
Expand All @@ -37,6 +26,7 @@ ARIA:
autoplay="{{false}}"
current="{{currentSwiperIndex}}"
bindchange="onSwiperChange"
bindtap="onClose"
tabindex="0"
>
<swiper-item
Expand Down

0 comments on commit fe38f85

Please sign in to comment.