diff --git a/packages/module/src/HorizontalNav/HorizontalNav.tsx b/packages/module/src/HorizontalNav/HorizontalNav.tsx index b8f8bb83..f59d69a7 100644 --- a/packages/module/src/HorizontalNav/HorizontalNav.tsx +++ b/packages/module/src/HorizontalNav/HorizontalNav.tsx @@ -4,6 +4,8 @@ import { Tabs, Tab, TabProps, TabTitleText, TabsProps as TabsPropsPF } from '@pa type TabsProps = Omit; export interface HorizontalNavProps extends TabsProps { + /** aria-label for all tabs */ + ariaLabel?: string; /** Navigation tabs */ tabs: Omit[]; /** Callback to handle tab selection */ @@ -11,6 +13,7 @@ export interface HorizontalNavProps extends TabsProps { }; const HorizontalNav: React.FunctionComponent = ({ + ariaLabel, tabs, defaultActiveKey, onTabSelect, @@ -28,6 +31,7 @@ const HorizontalNav: React.FunctionComponent = ({ onTabSelect?.(e, eventKey); }} role="nav" + aria-label={ariaLabel} {...props} > {tabs.map((tab) => ( @@ -35,6 +39,7 @@ const HorizontalNav: React.FunctionComponent = ({ {...tab} title={[ 'string', 'number', 'boolean' ].includes(typeof tab.title) ? {tab.title} : tab.title} key={tab.eventKey} + aria-label={`Tab ${tab.eventKey}`} > {tab.children}