Skip to content

Commit

Permalink
feat(tag): support aria (#1220)
Browse files Browse the repository at this point in the history
1. 针对读屏屏蔽文字标签中的装饰性icon访问。
2. 给“关闭”icon按钮添加标签“关闭”和“按钮”控件角色。
  • Loading branch information
huaiyinfeilong authored Dec 27, 2022
1 parent f084620 commit 2b34511
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/tag/tag.wxml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<view class="{{className}} {{prefix}}-class" style="{{tagStyle}} {{ customStyle }}" bind:tap="handleClick">
<view class="{{classPrefix}}__icon">
<view aria-hidden="{{true}}" class="{{classPrefix}}__icon">
<t-icon wx:if="{{icon}}" name="{{icon}}" t-class="{{prefix}}-icon" />
<slot wx:else name="icon" />
</view>
<view class="{{classPrefix}}__text">
<slot />
</view>
<t-icon
aria-role="button"
aria-label="关闭"
wx:if="{{ closable }}"
class="{{classPrefix}}__icon-close"
t-class="{{prefix}}-icon"
Expand Down

0 comments on commit 2b34511

Please sign in to comment.