|
5 | 5 | <strong>Angular Tabs</strong> <small>underline</small>
|
6 | 6 | </c-card-header>
|
7 | 7 | <c-card-body>
|
8 |
| - <c-nav variant="underline-border"> |
| 8 | + <c-nav variant="underline-border" role="tablist"> |
9 | 9 | <c-nav-item>
|
10 |
| - <a [cTabContent]="tabContent1" [tabPaneIdx]="0" cNavLink> |
| 10 | + <button [cTabContent]="tabContent1" [tabPaneIdx]="0" cNavLink > |
11 | 11 | <svg cIcon class="me-2" name="cilHome"></svg>
|
12 | 12 | Home
|
13 |
| - </a> |
| 13 | + </button> |
14 | 14 | </c-nav-item>
|
15 | 15 | <c-nav-item>
|
16 |
| - <a [cTabContent]="tabContent1" [tabPaneIdx]="1" cNavLink> |
| 16 | + <button [cTabContent]="tabContent1" [tabPaneIdx]="1" cNavLink > |
17 | 17 | <svg cIcon class="me-2" name="cilUser"></svg>
|
18 | 18 | Profile
|
19 |
| - </a> |
| 19 | + </button> |
20 | 20 | </c-nav-item>
|
21 | 21 | <c-nav-item>
|
22 |
| - <a [cTabContent]="tabContent1" [tabPaneIdx]="2" cNavLink |
23 |
| - [disabled]="tabContent1.activeTabPaneIdx < 1"> |
| 22 | + <button [cTabContent]="tabContent1" [tabPaneIdx]="2" cNavLink |
| 23 | + [disabled]="tabContent1.activeTabPaneIdx < 1" > |
24 | 24 | <svg cIcon class="me-2" name="cilCode"></svg>
|
25 | 25 | Contact
|
26 |
| - </a> |
| 26 | + </button> |
27 | 27 | </c-nav-item>
|
28 | 28 | </c-nav>
|
29 | 29 | <c-tab-content #tabContent1="cTabContent" [activeTabPaneIdx]="0" cRounded="bottom">
|
30 |
| - <c-tab-pane class="p-3 preview" role="tabpanel"> |
| 30 | + <c-tab-pane class="p-3 preview" > |
31 | 31 | This is some placeholder content the <strong>Home</strong> tab's associated content. Clicking another tab
|
32 | 32 | will toggle the visibility of this one for the next. The tab JavaScript swaps classes to control the
|
33 | 33 | content visibility and styling. You can use it with tabs, pills, and any other .nav-powered navigation.
|
34 | 34 | </c-tab-pane>
|
35 |
| - <c-tab-pane class="p-3 preview" role="tabpanel"> |
| 35 | + <c-tab-pane class="p-3 preview" > |
36 | 36 | This is some placeholder content the <strong>Profile</strong> tab's associated content. Clicking another
|
37 | 37 | tab will toggle the visibility of this one for the next. The tab JavaScript swaps classes to control the
|
38 | 38 | content visibility and styling. You can use it with tabs, pills, and any other .nav-powered navigation.
|
39 | 39 | </c-tab-pane>
|
40 | 40 | @if (tabContent1.activeTabPaneIdx > 0) {
|
41 |
| - <c-tab-pane class="p-3 preview" role="tabpanel"> |
| 41 | + <c-tab-pane class="p-3 preview" > |
42 | 42 | This is some placeholder content the <strong>Contact</strong> tab's associated content. Clicking another
|
43 | 43 | tab will toggle the visibility of this one for the next. The tab JavaScript swaps classes to control the
|
44 | 44 | content visibility and styling. You can use it with tabs, pills, and any other .nav-powered navigation.
|
|
54 | 54 | <strong>Angular Tabs</strong> <small>tabs</small>
|
55 | 55 | </c-card-header>
|
56 | 56 | <c-card-body>
|
57 |
| - <c-nav variant="tabs"> |
| 57 | + <c-nav variant="tabs" role="tablist"> |
58 | 58 | @for (nav of panes; track nav; let i = $index, isLast = $last) {
|
59 | 59 | <c-nav-item>
|
60 |
| - <a [cTabContent]="tabContent2" [disabled]="isLast" [tabPaneIdx]="i" cNavLink> |
| 60 | + <button [cTabContent]="tabContent2" [disabled]="isLast" [tabPaneIdx]="i" cNavLink > |
61 | 61 | <svg cIcon class="me-2" [name]="nav.icon"></svg>
|
62 | 62 | {{ nav.name }}
|
63 |
| - </a> |
| 63 | + </button> |
64 | 64 | </c-nav-item>
|
65 | 65 | }
|
66 | 66 | </c-nav>
|
67 | 67 | <c-tab-content #tabContent2="cTabContent" [activeTabPaneIdx]="0" cRounded="bottom">
|
68 | 68 | @for (pane of panes; track pane; let i = $index) {
|
69 |
| - <c-tab-pane class="p-3 preview"> |
| 69 | + <c-tab-pane class="p-3 preview" > |
70 | 70 | This is some placeholder content the <strong>{{ pane.name }}</strong> tab's associated content. Clicking
|
71 | 71 | another tab will toggle the visibility of this one for the next. The tab JavaScript swaps classes to
|
72 | 72 | control the content visibility and styling. You can use it with tabs, pills, and any other .nav-powered
|
|
83 | 83 | <strong>Angular Tabs</strong> <small>pills</small>
|
84 | 84 | </c-card-header>
|
85 | 85 | <c-card-body>
|
86 |
| - <c-nav variant="pills"> |
| 86 | + <c-nav variant="pills" role="tablist"> |
87 | 87 | <c-nav-item>
|
88 |
| - <a [cTabContent]="tabContent3" [tabPaneIdx]="0" cNavLink> |
| 88 | + <button [cTabContent]="tabContent3" [tabPaneIdx]="0" cNavLink > |
89 | 89 | <svg cIcon class="me-2" name="cilHome"></svg>
|
90 | 90 | Home
|
91 |
| - </a> |
| 91 | + </button> |
92 | 92 | </c-nav-item>
|
93 | 93 | <c-nav-item>
|
94 |
| - <a [cTabContent]="tabContent3" [tabPaneIdx]="1" cNavLink> |
| 94 | + <button [cTabContent]="tabContent3" [tabPaneIdx]="1" cNavLink > |
95 | 95 | <svg cIcon class="me-2" name="cilUser"></svg>
|
96 | 96 | Profile
|
97 |
| - </a> |
| 97 | + </button> |
98 | 98 | </c-nav-item>
|
99 | 99 | <c-nav-item>
|
100 |
| - <a [cTabContent]="tabContent3" [tabPaneIdx]="2" cNavLink> |
| 100 | + <button [cTabContent]="tabContent3" [tabPaneIdx]="2" cNavLink > |
101 | 101 | <svg cIcon class="me-2" name="cilCode"></svg>
|
102 | 102 | Contact
|
103 |
| - </a> |
| 103 | + </button> |
104 | 104 | </c-nav-item>
|
105 | 105 | </c-nav>
|
106 | 106 | <c-tab-content #tabContent3="cTabContent" cRounded="bottom" [activeTabPaneIdx]="0">
|
107 |
| - <c-tab-pane aria-labelledby="docs-code-preview" class="p-3 preview" role="tabpanel"> |
| 107 | + <c-tab-pane aria-labelledby="docs-code-preview" class="p-3 preview" > |
108 | 108 | This is some placeholder content the <strong>Home</strong> tab's associated content. Clicking another tab
|
109 | 109 | will toggle the visibility of this one for the next. The tab JavaScript swaps classes to control the
|
110 | 110 | content visibility and styling. You can use it with tabs, pills, and any other .nav-powered navigation.
|
111 | 111 | </c-tab-pane>
|
112 |
| - <c-tab-pane aria-labelledby="docs-code-preview" class="p-3 preview" role="tabpanel"> |
| 112 | + <c-tab-pane aria-labelledby="docs-code-preview" class="p-3 preview" > |
113 | 113 | This is some placeholder content the <strong>Profile</strong> tab's associated content. Clicking another
|
114 | 114 | tab will toggle the visibility of this one for the next. The tab JavaScript swaps classes to control the
|
115 | 115 | content visibility and styling. You can use it with tabs, pills, and any other .nav-powered navigation.
|
116 | 116 | </c-tab-pane>
|
117 |
| - <c-tab-pane aria-labelledby="docs-code-preview" class="p-3 preview" role="tabpanel"> |
| 117 | + <c-tab-pane aria-labelledby="docs-code-preview" class="p-3 preview" > |
118 | 118 | This is some placeholder content the <strong>Contact</strong> tab's associated content. Clicking another
|
119 | 119 | tab will toggle the visibility of this one for the next. The tab JavaScript swaps classes to control the
|
120 | 120 | content visibility and styling. You can use it with tabs, pills, and any other .nav-powered navigation.
|
|
0 commit comments