File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 11<wxs src="../common/utils.wxs" module="_" />
2+ <wxs src="./cascader.wxs" module="aria" />
23
34<t-popup class="class" visible="{{visible}}" placement="bottom" bind:visible-change="hide">
45 <view style="{{_._style([style, customStyle])}}" class="{{name}}">
2021 bind:tap="onStepClick"
2122 data-index="{{index}}"
2223 aria-role="{{ item === defaultOptionLabel ? 'presentation' : 'button' }}"
23- aria-label="{{ item === defaultOptionLabel ? item : '已选中,' + item }}"
24+ aria-label="{{ item === defaultOptionLabel ? item : aria.getAriaLabel(index, item) }}"
25+ aria-current="{{item === defaultOptionLabel ? '': 'step'}}"
2426 >
2527 <view
2628 class="{{name}}__step-dot {{name}}__step-dot--{{item !== defaultOptionLabel ? 'active' : ''}} {{name}}__step-dot--{{index === steps.length - 1 ? 'last' : ''}}"
Original file line number Diff line number Diff line change 1+ function getAriaLabel(index, content) {
2+ return '第' + (index + 1) + '级:'+ content;
3+ }
4+
5+ module.exports = {
6+ getAriaLabel: getAriaLabel,
7+ };
You can’t perform that action at this time.
0 commit comments