File tree 3 files changed +5
-3
lines changed
packages/orbit-components/src/Breadcrumbs
3 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -21,13 +21,13 @@ The Table below contains all types of props available in the Breadcrumbs compone
21
21
| Name | Type | Default | Description |
22
22
| :----------- | :------------------------- | :------- | :------------------------------------------------------------------------------------------------------------------------- |
23
23
| dataTest | ` string ` | | Optional prop for testing purposes. |
24
- | id | ` string ` | | Set ` id ` for ` Breadcrumbs ` |
24
+ | id | ` string ` | | Set ` id ` for ` Breadcrumbs ` . |
25
25
| ** children** | ` React.Node ` | | The content of the Breadcrumbs, normally [ ` BreadcrumbsItem ` ] ( #breadcrumbsitem ) . |
26
26
| onGoBack | ` event => void \| Promise ` | | Callback for handling back button action. If present the back button is visible. |
27
27
| backHref | ` string ` | | The location for the back button to direct to. Turns the back button into a link when present (renders as an ` a ` element). |
28
28
| goBackTitle | ` React.Node ` | ` "Back" ` | Translation string for the go back link on mobile, defined when onGoBack is defined. |
29
- | |
30
29
| spaceAfter | ` enum ` | | Additional ` margin-bottom ` after component. |
30
+ | ariaLabel | ` string ` | | Optional prop for ` aria-label ` . |
31
31
32
32
### enum
33
33
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ const Breadcrumbs = ({
18
18
spaceAfter,
19
19
backHref,
20
20
id,
21
+ ariaLabel = "Breadcrumb" ,
21
22
} : Props ) => {
22
23
const childEls = React . Children . toArray ( children ) as React . ReactElement < BreadcrumbsItemProps > [ ] ;
23
24
@@ -26,7 +27,7 @@ const Breadcrumbs = ({
26
27
< Hide on = { [ "smallMobile" , "mediumMobile" ] } >
27
28
< nav
28
29
className = { cx ( "font-base text-small" , spaceAfter && spaceAfterClasses [ spaceAfter ] ) }
29
- aria-label = "Breadcrumb"
30
+ aria-label = { ariaLabel }
30
31
id = { id }
31
32
data-test = { dataTest }
32
33
>
Original file line number Diff line number Diff line change @@ -10,4 +10,5 @@ export interface Props extends Common.Globals, Common.SpaceAfter {
10
10
readonly goBackTitle ?: React . ReactNode ;
11
11
readonly onGoBack ?: Common . Event < React . SyntheticEvent < HTMLAnchorElement > > ;
12
12
readonly backHref ?: string ;
13
+ readonly ariaLabel ?: string ;
13
14
}
You can’t perform that action at this time.
0 commit comments