File tree 3 files changed +15
-8
lines changed
packages/orbit-components/src/Tabs
3 files changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -42,13 +42,15 @@ Table below contains all types of the props available in Tabs component.
42
42
43
43
Table below contains all types of the props available in TabList component.
44
44
45
- | Name | Type | Default | Description |
46
- | :-------- | :-------------- | :------ | :----------------------------------------------------------------------------------- |
47
- | dataTest | ` string ` | | Optional prop for testing purposes. |
48
- | children | ` React.node ` | | Required prop that should contain the ` Tab ` components. |
49
- | compact | ` boolean ` | ` false ` | Optional prop that responsible for ` Tab ` size, if provided, the Tabs will be smaller. |
50
- | spacing | [ ` enum ` ] ( #enum ) | ` none ` | Optional prop to set gap between ` Tab ` elements. |
51
- | fullWidth | ` boolean ` | ` false ` | Optional prop to set ` TabList ` to full width. |
45
+ | Name | Type | Default | Description |
46
+ | :------------- | :-------------- | :------ | :----------------------------------------------------------------------------------- |
47
+ | dataTest | ` string ` | | Optional prop for testing purposes. |
48
+ | children | ` React.node ` | | Required prop that should contain the ` Tab ` components. |
49
+ | compact | ` boolean ` | ` false ` | Optional prop that responsible for ` Tab ` size, if provided, the Tabs will be smaller. |
50
+ | spacing | [ ` enum ` ] ( #enum ) | ` none ` | Optional prop to set gap between ` Tab ` elements. |
51
+ | fullWidth | ` boolean ` | ` false ` | Optional prop to set ` TabList ` to full width. |
52
+ | ariaLabel | ` string ` | | Optional prop for ` aria-label ` . |
53
+ | ariaLabelledBy | ` string ` | | Optional prop for ` aria-labelledby ` . |
52
54
53
55
### Tab
54
56
Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ const TabList = ({
15
15
margin,
16
16
dataTest,
17
17
fullWidth,
18
+ ariaLabel,
19
+ ariaLabelledby,
18
20
} : Props ) => {
19
21
const cssVars = {
20
22
"--tab-list-padding" : typeof padding === "string" ? padding : undefined ,
@@ -45,7 +47,8 @@ const TabList = ({
45
47
cssVars [ "--tab-list-margin-left" ] && "ms-[var(--tab-list-margin-left)]" ,
46
48
) }
47
49
role = "tablist"
48
- aria-label = "tabs"
50
+ aria-label = { ariaLabel }
51
+ aria-labelledby = { ariaLabelledby }
49
52
data-test = { dataTest }
50
53
style = { cssVars }
51
54
>
Original file line number Diff line number Diff line change @@ -10,4 +10,6 @@ export interface Props extends Globals {
10
10
compact ?: boolean ;
11
11
margin ?: React . CSSProperties [ "margin" ] | ObjectProperty ;
12
12
padding ?: React . CSSProperties [ "padding" ] | ObjectProperty ;
13
+ ariaLabel ?: string ;
14
+ ariaLabelledby ?: string ;
13
15
}
You can’t perform that action at this time.
0 commit comments