-
Notifications
You must be signed in to change notification settings - Fork 319
feat(cascader): support aria #1657
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
Open
zhangpaopao0609
wants to merge
21
commits into
Tencent:develop
Choose a base branch
from
zhangpaopao0609:feature/cascader-aria
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
3a05f3e
feat(cascader): support aria
zhangpaopao0609 e0218f4
feat(cascader): label and hidden
zhangpaopao0609 c11335e
feat(cascader): hidden
zhangpaopao0609 9b89cff
feat(cascader): text change to option
zhangpaopao0609 964b3a0
feat(cascader): add index label
zhangpaopao0609 67e27a3
chore: Merge branch 'develop' into feature/cascader-aria
zhangpaopao0609 281dce9
feat(cascader): change dom to no-dom
zhangpaopao0609 7a016fd
chore(cascader): update sanp
zhangpaopao0609 3418f11
chore: Merge branch 'develop' into feature/cascader-aria
zhangpaopao0609 202d86d
feat(cascader): placement
zhangpaopao0609 53ad712
chore(cascader): update sanp
zhangpaopao0609 d31f070
chore: merge develop
zhangpaopao0609 36e5768
refactor(cascader): optimization
zhangpaopao0609 f857cd0
fix: babel transform-class-properties
zhangpaopao0609 1857468
chore: merge develop
zhangpaopao0609 ee78c88
chore: merge develop for fix conflict
zhangpaopao0609 225481e
chore: update snap
zhangpaopao0609 c0f904f
chore: update snap
zhangpaopao0609 8cfa50a
chore: merge develop
zhangpaopao0609 3f2b8f0
chore: update snap
zhangpaopao0609 ccb3db7
feat(cascader): icon hidden
zhangpaopao0609 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,12 +8,20 @@ | |
| </view> | ||
| <view class="{{name}}__close-btn" bind:tap="hide"> | ||
| <slot name="close-btn" /> | ||
| <t-icon wx:if="{{closeBtn}}" size="24" name="close" /> | ||
| <t-icon wx:if="{{closeBtn}}" aria-role="button" aria-label="关闭" size="24" name="close" /> | ||
| </view> | ||
| <view class="{{name}}__content"> | ||
| <block wx:if="{{steps && steps.length}}"> | ||
| <view wx:if="{{theme == 'step'}}" class="{{name}}__steps"> | ||
| <view wx:for="{{steps}}" wx:key="index" class="{{name}}__step" bind:tap="onStepClick" data-index="{{index}}"> | ||
| <view | ||
| wx:for="{{steps}}" | ||
| wx:key="index" | ||
| class="{{name}}__step" | ||
| bind:tap="onStepClick" | ||
| data-index="{{index}}" | ||
| aria-role="{{ item === defaultOptionLabel ? 'text' : 'button' }}" | ||
| aria-label="{{ item === defaultOptionLabel ? item : '已选中,' + item }}" | ||
| > | ||
| <view | ||
| class="{{name}}__step-dot {{name}}__step-dot--{{item !== defaultOptionLabel ? 'active' : ''}} {{name}}__step-dot--{{index === steps.length - 1 ? 'last' : ''}}" | ||
| ></view> | ||
|
|
@@ -29,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)" | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 这个style去掉了,符合预期吗 |
||
|
|
@@ -44,7 +52,7 @@ | |
| scroll-y | ||
| scroll-top="{{scrollTopList[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}}" | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.