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(sidebar): support aria #1554

Merged
merged 2 commits into from
Feb 14, 2023
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
80 changes: 40 additions & 40 deletions src/side-bar/__test__/__snapshots__/demo.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ exports[`SideBar SideBar base demo works fine 1`] = `
>
<t-side-bar-item
badgeProps="{{Object {}}}"
label="选项选项选项选项"
label="选项一"
value="{{0}}"
/>
<t-side-bar-item
Expand All @@ -20,12 +20,12 @@ exports[`SideBar SideBar base demo works fine 1`] = `
"dot": true,
}
}}"
label="选项"
label="选项二"
value="{{1}}"
/>
<t-side-bar-item
badgeProps="{{Object {}}}"
label="选项"
label="选项三"
value="{{2}}"
/>
<t-side-bar-item
Expand All @@ -34,12 +34,12 @@ exports[`SideBar SideBar base demo works fine 1`] = `
"count": 6,
}
}}"
label="选项"
label="选项四"
value="{{3}}"
/>
<t-side-bar-item
badgeProps="{{Object {}}}"
label="选项"
label="选项五"
value="{{4}}"
/>
</t-side-bar>
Expand All @@ -56,7 +56,7 @@ exports[`SideBar SideBar base demo works fine 1`] = `
<wx-view
class="title"
>
标题
标题一
</wx-view>
<t-grid
border="{{false}}"
Expand Down Expand Up @@ -190,7 +190,7 @@ exports[`SideBar SideBar base demo works fine 1`] = `
<wx-view
class="title"
>
标题
标题二
</wx-view>
<t-grid
border="{{false}}"
Expand Down Expand Up @@ -294,7 +294,7 @@ exports[`SideBar SideBar base demo works fine 1`] = `
<wx-view
class="title"
>
标题
标题三
</wx-view>
<t-grid
border="{{false}}"
Expand Down Expand Up @@ -398,7 +398,7 @@ exports[`SideBar SideBar base demo works fine 1`] = `
<wx-view
class="title"
>
标题
标题四
</wx-view>
<t-grid
border="{{false}}"
Expand Down Expand Up @@ -472,7 +472,7 @@ exports[`SideBar SideBar base demo works fine 1`] = `
<wx-view
class="title"
>
标题
标题五
</wx-view>
<t-grid
border="{{false}}"
Expand Down Expand Up @@ -526,7 +526,7 @@ exports[`SideBar SideBar custom demo works fine 1`] = `
>
<t-side-bar-item
badgeProps="{{Object {}}}"
label="选项选项"
label="选项一"
value="{{0}}"
/>
<t-side-bar-item
Expand All @@ -535,12 +535,12 @@ exports[`SideBar SideBar custom demo works fine 1`] = `
"dot": true,
}
}}"
label="选项"
label="选项二"
value="{{1}}"
/>
<t-side-bar-item
badgeProps="{{Object {}}}"
label="选项"
label="选项三"
value="{{2}}"
/>
<t-side-bar-item
Expand All @@ -549,12 +549,12 @@ exports[`SideBar SideBar custom demo works fine 1`] = `
"count": 6,
}
}}"
label="选项"
label="选项四"
value="{{3}}"
/>
<t-side-bar-item
badgeProps="{{Object {}}}"
label="选项"
label="选项五"
value="{{4}}"
/>
</t-side-bar>
Expand All @@ -571,7 +571,7 @@ exports[`SideBar SideBar custom demo works fine 1`] = `
<wx-view
class="title"
>
标题
标题一
</wx-view>
<t-grid
border="{{false}}"
Expand Down Expand Up @@ -705,7 +705,7 @@ exports[`SideBar SideBar custom demo works fine 1`] = `
<wx-view
class="title"
>
标题
标题二
</wx-view>
<t-grid
border="{{false}}"
Expand Down Expand Up @@ -809,7 +809,7 @@ exports[`SideBar SideBar custom demo works fine 1`] = `
<wx-view
class="title"
>
标题
标题三
</wx-view>
<t-grid
border="{{false}}"
Expand Down Expand Up @@ -913,7 +913,7 @@ exports[`SideBar SideBar custom demo works fine 1`] = `
<wx-view
class="title"
>
标题
标题四
</wx-view>
<t-grid
border="{{false}}"
Expand Down Expand Up @@ -987,7 +987,7 @@ exports[`SideBar SideBar custom demo works fine 1`] = `
<wx-view
class="title"
>
标题
标题五
</wx-view>
<t-grid
border="{{false}}"
Expand Down Expand Up @@ -1042,7 +1042,7 @@ exports[`SideBar SideBar switch demo works fine 1`] = `
<t-side-bar-item
badgeProps="{{Object {}}}"
disabled=""
label="选项"
label="选项一"
value="{{0}}"
/>
<t-side-bar-item
Expand All @@ -1052,13 +1052,13 @@ exports[`SideBar SideBar switch demo works fine 1`] = `
}
}}"
disabled=""
label="选项"
label="选项二"
value="{{1}}"
/>
<t-side-bar-item
badgeProps="{{Object {}}}"
disabled=""
label="选项"
label="选项三"
value="{{2}}"
/>
<t-side-bar-item
Expand All @@ -1068,13 +1068,13 @@ exports[`SideBar SideBar switch demo works fine 1`] = `
}
}}"
disabled=""
label="选项"
label="选项四"
value="{{3}}"
/>
<t-side-bar-item
badgeProps="{{Object {}}}"
disabled="{{true}}"
label="选项"
label="选项五"
value="{{4}}"
/>
</t-side-bar>
Expand All @@ -1091,7 +1091,7 @@ exports[`SideBar SideBar switch demo works fine 1`] = `
<wx-view
class="title"
>
标题
标题一
</wx-view>
<t-cell-group>
<t-cell
Expand Down Expand Up @@ -1237,7 +1237,7 @@ exports[`SideBar SideBar switch demo works fine 1`] = `
<wx-view
class="title"
>
标题
标题二
</wx-view>
<t-cell-group>
<t-cell
Expand Down Expand Up @@ -1361,7 +1361,7 @@ exports[`SideBar SideBar switch demo works fine 1`] = `
<wx-view
class="title"
>
标题
标题三
</wx-view>
<t-cell-group>
<t-cell
Expand Down Expand Up @@ -1441,7 +1441,7 @@ exports[`SideBar SideBar switch demo works fine 1`] = `
<wx-view
class="title"
>
标题
标题四
</wx-view>
<t-cell-group>
<t-cell
Expand Down Expand Up @@ -1543,7 +1543,7 @@ exports[`SideBar SideBar switch demo works fine 1`] = `
<wx-view
class="title"
>
标题
标题五
</wx-view>
<t-cell-group />
</wx-scroll-view>
Expand All @@ -1564,7 +1564,7 @@ exports[`SideBar SideBar with-icon demo works fine 1`] = `
<t-side-bar-item
badgeProps="{{Object {}}}"
icon="app"
label="选项"
label="选项一"
value="{{0}}"
/>
<t-side-bar-item
Expand All @@ -1574,13 +1574,13 @@ exports[`SideBar SideBar with-icon demo works fine 1`] = `
}
}}"
icon="app"
label="选项"
label="选项二"
value="{{1}}"
/>
<t-side-bar-item
badgeProps="{{Object {}}}"
icon="app"
label="选项"
label="选项三"
value="{{2}}"
/>
<t-side-bar-item
Expand All @@ -1590,13 +1590,13 @@ exports[`SideBar SideBar with-icon demo works fine 1`] = `
}
}}"
icon="app"
label="选项"
label="选项四"
value="{{3}}"
/>
<t-side-bar-item
badgeProps="{{Object {}}}"
icon="app"
label="选项"
label="选项五"
value="{{4}}"
/>
</t-side-bar>
Expand All @@ -1613,7 +1613,7 @@ exports[`SideBar SideBar with-icon demo works fine 1`] = `
<wx-view
class="title"
>
标题
标题一
</wx-view>
<t-grid
border="{{false}}"
Expand Down Expand Up @@ -1747,7 +1747,7 @@ exports[`SideBar SideBar with-icon demo works fine 1`] = `
<wx-view
class="title"
>
标题
标题二
</wx-view>
<t-grid
border="{{false}}"
Expand Down Expand Up @@ -1851,7 +1851,7 @@ exports[`SideBar SideBar with-icon demo works fine 1`] = `
<wx-view
class="title"
>
标题
标题三
</wx-view>
<t-grid
border="{{false}}"
Expand Down Expand Up @@ -1955,7 +1955,7 @@ exports[`SideBar SideBar with-icon demo works fine 1`] = `
<wx-view
class="title"
>
标题
标题四
</wx-view>
<t-grid
border="{{false}}"
Expand Down Expand Up @@ -2029,7 +2029,7 @@ exports[`SideBar SideBar with-icon demo works fine 1`] = `
<wx-view
class="title"
>
标题
标题五
</wx-view>
<t-grid
border="{{false}}"
Expand Down
20 changes: 10 additions & 10 deletions src/side-bar/_example/base/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,36 @@ Page({
scrollTop: 0,
categories: [
{
label: '选项选项选项选项',
title: '标题',
label: '选项一',
title: '标题一',
badgeProps: {},
items,
},
{
label: '选项',
title: '标题',
label: '选项二',
title: '标题二',
badgeProps: {
dot: true,
},
items: items.slice(0, 9),
},
{
label: '选项',
title: '标题',
label: '选项三',
title: '标题三',
badgeProps: {},
items: items.slice(0, 9),
},
{
label: '选项',
title: '标题',
label: '选项四',
title: '标题四',
badgeProps: {
count: 6,
},
items: items.slice(0, 6),
},
{
label: '选项',
title: '标题',
label: '选项五',
title: '标题五',
badgeProps: {},
items: items.slice(0, 3),
},
Expand Down
Loading