Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(radio): 修复朗读问题. (#1026) #1139

Merged
merged 3 commits into from
Dec 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/radio-group/radio-group.wxml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<view style="{{ customStyle }}" class="{{classPrefix}} {{prefix}}-class">
<view style="{{ customStyle }}" class="{{classPrefix}} {{prefix}}-class" aria-role="radiogroup">
<slot />
<block wx:for="{{radioOptions}}" wx:key="value">
<t-radio
Expand Down
1 change: 1 addition & 0 deletions src/radio/radio.less
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
height: @radio-icon-size;
font-size: @radio-icon-size;
color: @radio-icon-color;
overflow: hidden;

&:empty {
display: none;
Expand Down
10 changes: 9 additions & 1 deletion src/radio/radio.wxml
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
<wxs src="../common/utils.wxs" module="_" />

<view style="{{ customStyle }}" class="{{_.cls(classPrefix, [align, ['block', block]])}} {{prefix}}-class">
<view
style="{{ customStyle }}"
class="{{_.cls(classPrefix, [align, ['block', block]])}} {{prefix}}-class"
disabled="{{disabled}}"
aria-role="radio"
LeeJim marked this conversation as resolved.
Show resolved Hide resolved
aria-checked="{{checked}}"
aria-label="{{label + content}}"
aria-disabled="{{disabled}}"
>
<view
class="{{_.cls(classPrefix + '__icon', [align, ['checked', checked], ['disabled', disabled]])}} {{prefix}}-class-icon"
data-target="icon"
Expand Down