Skip to content

Commit

Permalink
feat(example): add a11y support
Browse files Browse the repository at this point in the history
  • Loading branch information
gzzhanghao committed Dec 28, 2022
1 parent 39731f8 commit 28bc982
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
8 changes: 4 additions & 4 deletions example/components/pull-down-list/index.wxml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<view class="pullDownList t-class {{ childBoxHeight > 0 ? 'actived' : '' }}">
<view class="switchBox" catch:tap="switchHandle">
<view class="switchBox" aria-role="button" aria-expanded="{{!!childBoxHeight}}" catch:tap="switchHandle">
<view class="name">{{ name }}</view>
<t-icon name="{{icon}}" size="48rpx" color="#A6A6A6" t-class="icon" />
</view>
<view class="childBox" style="height: {{ childBoxHeight }}rpx">
<view class="child" wx:for="{{childArr}}" wx:key="name" data-item="{{item}}" bind:tap="tapChild">
<view class="childBox" style="height: {{ childBoxHeight }}rpx" aria-hidden="{{childBoxHeight ? '' : true}}">
<view class="child" wx:for="{{childArr}}" wx:key="name" data-item="{{item}}" aria-role="button" bind:tap="tapChild">
{{ item.name }} {{ item.label }}
<t-icon name="chevron-right" color="#bbb" />
<t-icon name="chevron-right" color="#bbb" aria-hidden="{{childBoxHeight ? '' : true}}" />
</view>
</view>
</view>
8 changes: 7 additions & 1 deletion example/pages/home/home.wxml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
<view class="main">
<view class="title-wrap">
<image class="title-icon" mode="aspectFit" src="/assets/TDesignLogo@2x.png" />
<image
class="title-icon"
mode="aspectFit"
src="/assets/TDesignLogo@2x.png"
alt="TDesign Logo"
aria-label="TDesign Logo"
/>
</view>
<view class="desc"> TDesign 适配微信小程序的组件库 </view>
<pull-down-list
Expand Down

0 comments on commit 28bc982

Please sign in to comment.