File tree 2 files changed +16
-8
lines changed
2 files changed +16
-8
lines changed Original file line number Diff line number Diff line change 4
4
border-radius : var (--rounded );
5
5
}
6
6
7
- .tabs menu {
7
+ .tabs nav {
8
8
display : flex;
9
9
}
10
10
11
- .tabs menu button {
11
+ .tabs nav button {
12
12
position : relative;
13
13
padding : var (--spacing-2 ) var (--spacing-3 );
14
14
font-size : var (--text-xs );
15
15
overflow : visible;
16
16
}
17
17
18
- .tabs menu button [aria-current = "true" ]::after {
18
+ .tabs nav button [aria-selected = "true" ]::after {
19
19
position : absolute;
20
20
content : "" ;
21
21
height : 2px ;
24
24
background : currentColor;
25
25
}
26
26
27
- .tabs menu button : not ([aria-current = "true" ]): hover {
27
+ .tabs nav button : not ([aria-selected = "true" ]): hover {
28
28
opacity : 0.75 ;
29
29
}
30
30
Original file line number Diff line number Diff line change 1
- <menu >
1
+ <nav role="tablist" >
2
2
<?php foreach ($ tabs as $ key => $ tab ): ?>
3
3
<button
4
- :aria-current="current === '<?= $ key ?> '"
4
+ :aria-selected="current === '<?= $ key ?> '"
5
+ aria-controls="tabs-<?= $ id ?> -<?= $ key ?> "
6
+ id="tabs-<?= $ id ?> -<?= $ key ?> -label"
7
+ role="tab"
5
8
@click="current = '<?= $ key ?> '"
6
9
>
7
10
<?= $ tab ['title ' ] ?>
8
11
</button>
9
12
<?php endforeach ?>
10
- </menu >
13
+ </nav >
11
14
12
15
<?php foreach ($ tabs as $ key => $ tab ): ?>
13
- <div v-show="current === '<?= $ key ?> '">
16
+ <div
17
+ v-show="current === '<?= $ key ?> '"
18
+ aria-labelledby="tabs-<?= $ id ?> -<?= $ key ?> -label"
19
+ id="tabs-<?= $ id ?> -<?= $ key ?> "
20
+ role="tabpanel"
21
+ >
14
22
<?= $ tab ['content ' ] ?>
15
23
</div>
16
24
<?php endforeach ?>
You can’t perform that action at this time.
0 commit comments