Skip to content

Commit b44d841

Browse files
Address interface/a11y feedback
1 parent d5665b5 commit b44d841

File tree

4 files changed

+16
-2
lines changed

4 files changed

+16
-2
lines changed

packages/react-core/src/components/Compass/CompassNavContent.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ import { css } from '@patternfly/react-styles';
33
export interface CompassNavContentProps extends React.HTMLProps<HTMLDivElement> {
44
/** Content of the nav content wrapper. */
55
children: React.ReactNode;
6+
/** Additional classes added to the nav content. */
7+
className?: string;
8+
/** Accessible label for the nav content. */
9+
'aria-label'?: string;
610
}
711

812
export const CompassNavContent: React.FunctionComponent<CompassNavContentProps> = ({

packages/react-core/src/components/Compass/CompassNavHome.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ export interface CompassNavHomeProps extends Omit<React.HTMLProps<HTMLDivElement
4343
tooltipContent?: React.ReactNode;
4444
/** Click handler for the home button. */
4545
onClick?: React.MouseEventHandler<HTMLButtonElement>;
46+
/** Additional classes added to the nav home wrapper. */
47+
className?: string;
48+
/** Accessible label for the nav home. */
49+
'aria-label'?: string;
4650
}
4751

4852
export const CompassNavHome: React.FunctionComponent<CompassNavHomeProps> = ({
@@ -56,7 +60,7 @@ export const CompassNavHome: React.FunctionComponent<CompassNavHomeProps> = ({
5660

5761
return (
5862
<div className={css(styles.compassNav + '-home', className)} {...props}>
59-
<Tooltip content={tooltipContent} triggerRef={buttonRef}>
63+
<Tooltip content={tooltipContent} position="left" aria="none" aria-live="off" triggerRef={buttonRef}>
6064
<Button
6165
isCircle
6266
variant="plain"

packages/react-core/src/components/Compass/CompassNavMain.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import { css } from '@patternfly/react-styles';
44
export interface CompassNavMainProps extends React.HTMLProps<HTMLDivElement> {
55
/** Content of the nav main section (typically tabs). */
66
children: React.ReactNode;
7+
/** Additional classes added to the nav main section. */
8+
className?: string;
79
}
810

911
export const CompassNavMain: React.FunctionComponent<CompassNavMainProps> = ({

packages/react-core/src/components/Compass/CompassNavSearch.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,10 @@ export interface CompassNavSearchProps extends Omit<React.HTMLProps<HTMLDivEleme
3636
tooltipContent?: React.ReactNode;
3737
/** Click handler for the search button. */
3838
onClick?: React.MouseEventHandler<HTMLButtonElement>;
39+
/** Additional classes added to the nav search wrapper. */
40+
className?: string;
41+
/** Accessible label for the nav search. */
42+
'aria-label'?: string;
3943
}
4044

4145
export const CompassNavSearch: React.FunctionComponent<CompassNavSearchProps> = ({
@@ -49,7 +53,7 @@ export const CompassNavSearch: React.FunctionComponent<CompassNavSearchProps> =
4953

5054
return (
5155
<div className={css(styles.compassNav + '-search', className)} {...props}>
52-
<Tooltip content={tooltipContent} triggerRef={buttonRef}>
56+
<Tooltip content={tooltipContent} aria="none" aria-live="off" triggerRef={buttonRef}>
5357
<Button
5458
isCircle
5559
variant="plain"

0 commit comments

Comments
 (0)