Skip to content

Commit

Permalink
feat(cascader): radio group add ariaHidden
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangpaopao0609 committed Mar 15, 2023
1 parent c11335e commit 3cf8602
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/cascader/cascader.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
class="{{name}}__step"
bind:tap="onStepClick"
data-index="{{index}}"
aria-role="{{ item === defaultOptionLabel ? 'text' : 'button' }}"
aria-role="{{ item === defaultOptionLabel ? 'presentation' : 'button' }}"
aria-label="{{ item === defaultOptionLabel ? item : '已选中,' + item }}"
>
<view
Expand Down Expand Up @@ -62,6 +62,7 @@
align="right"
icon="line"
borderless
aria-hidden="{{ stepIndex !== index}}"
>
</t-radio-group>
</view>
Expand Down
7 changes: 6 additions & 1 deletion src/radio-group/radio-group.wxml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
<wxs src="../common/utils.wxs" module="_" />

<view style="{{_._style([style, customStyle])}}" class="{{classPrefix}} class {{prefix}}-class" aria-role="radiogroup">
<view
style="{{_._style([style, customStyle])}}"
class="{{classPrefix}} class {{prefix}}-class"
aria-role="radiogroup"
aria-hidden="{{ ariaHidden === undefined ? false : !!ariaHidden }}"
>
<slot />
<block wx:for="{{radioOptions}}" wx:key="value">
<t-radio
Expand Down

0 comments on commit 3cf8602

Please sign in to comment.