You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/4.0/components/CNav.mdx
+136-4Lines changed: 136 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,13 @@
1
1
---
2
-
title: React Nav Component
3
-
name: Nav
2
+
title: React Navs & Tabs Components
3
+
name: Navs & Tabs
4
4
description: Documentation and examples for how to use CoreUI's included React navigation components.
5
5
menu: Components
6
-
route: /components/nav
6
+
route: /components/navs-tabs
7
7
---
8
8
9
9
import { Playground, Props } from'docz'
10
+
import { useState } from'react'
10
11
11
12
import {
12
13
CDropdown,
@@ -18,7 +19,9 @@ import {
18
19
CDropdownToggle,
19
20
CNav,
20
21
CNavItem,
21
-
CNavLink
22
+
CNavLink,
23
+
CTabContent,
24
+
CTabPane,
22
25
} from'../../../src/index.ts'
23
26
24
27
## Base nav
@@ -323,6 +326,126 @@ Add dropdown menus with a little extra HTML.
323
326
</CNav>
324
327
</Playground>
325
328
329
+
## Tab panes
330
+
331
+
Dynamic tabbed interfaces, as described in the [<abbrtitle="Web Accessibility Initiative">WAI</abbr> <abbrtitle="Accessible Rich Internet Applications">ARIA</abbr> Authoring Practices](https://www.w3.org/TR/wai-aria-practices/#tabpanel), require `role="tablist"`, `role="tab"`, `role="tabpanel"`, and additional `aria-` attributes in order to convey their structure, functionality and current state to users of assistive technologies (such as screen readers).
332
+
333
+
Note that dynamic tabbed interfaces should not contain dropdown menus, as this causes both usability and accessibility issues. From a usability perspective, the fact that the currently displayed tab's trigger element is not immediately visible (as it's inside the closed dropdown menu) can cause confusion. From an accessibility point of view, there is currently no sensible way to map this sort of construct to a standard WAI ARIA pattern, meaning that it cannot be easily made understandable to users of assistive technologies.
0 commit comments