Skip to content

Commit 3cf8602

Browse files
feat(cascader): radio group add ariaHidden
1 parent c11335e commit 3cf8602

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/cascader/cascader.wxml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
class="{{name}}__step"
2020
bind:tap="onStepClick"
2121
data-index="{{index}}"
22-
aria-role="{{ item === defaultOptionLabel ? 'text' : 'button' }}"
22+
aria-role="{{ item === defaultOptionLabel ? 'presentation' : 'button' }}"
2323
aria-label="{{ item === defaultOptionLabel ? item : '已选中,' + item }}"
2424
>
2525
<view
@@ -62,6 +62,7 @@
6262
align="right"
6363
icon="line"
6464
borderless
65+
aria-hidden="{{ stepIndex !== index}}"
6566
>
6667
</t-radio-group>
6768
</view>

src/radio-group/radio-group.wxml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
<wxs src="../common/utils.wxs" module="_" />
22

3-
<view style="{{_._style([style, customStyle])}}" class="{{classPrefix}} class {{prefix}}-class" aria-role="radiogroup">
3+
<view
4+
style="{{_._style([style, customStyle])}}"
5+
class="{{classPrefix}} class {{prefix}}-class"
6+
aria-role="radiogroup"
7+
aria-hidden="{{ ariaHidden === undefined ? false : !!ariaHidden }}"
8+
>
49
<slot />
510
<block wx:for="{{radioOptions}}" wx:key="value">
611
<t-radio

0 commit comments

Comments
 (0)