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

feat(cascader): support aria #1657

Open
wants to merge 21 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
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
Prev Previous commit
Next Next commit
feat(cascader): hidden
zhangpaopao0609 committed Mar 6, 2023

Verified

This commit was signed with the committer’s verified signature.
FrederikBolding Frederik Bolding
commit c11335e9e1b27370c9263f5ddfa6022d2f2543bb
11 changes: 5 additions & 6 deletions src/cascader/cascader.wxml
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@
class="{{name}}__step"
bind:tap="onStepClick"
data-index="{{index}}"
aria-role="button"
aria-role="{{ item === defaultOptionLabel ? 'text' : 'button' }}"
zhangpaopao0609 marked this conversation as resolved.
Show resolved Hide resolved
aria-label="{{ item === defaultOptionLabel ? item : '已选中,' + item }}"
>
<view
@@ -37,9 +37,9 @@
</t-tabs>
</block>
</block>
<view wx:if="{{ subTitles && subTitles[stepIndex] }}" class="{{name}}__options-title"
>{{subTitles[stepIndex]}}</view
>
<view wx:if="{{ subTitles && subTitles[stepIndex] }}" class="{{name}}__options-title">
{{subTitles[stepIndex]}}
</view>
<view
class="{{name}}__options-container"
style="width: {{items.length + 1}}00vw; transform: translateX(-{{stepIndex}}00vw)"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个style去掉了,符合预期吗

@@ -51,9 +51,8 @@
class="{{name}}__options"
scroll-y
scroll-top="{{scrollTopList[index]}}"
aria-hidden="{{ stepIndex !== index}}"
>
<view class="cascader-radio-group-{{index}}">
<view class="cascader-radio-group-{{index}}" aria-hidden="{{ stepIndex !== index}}">
<t-radio-group
value="{{selectedValue[index]}}"
keys="{{keys}}"