Skip to content

Commit d959345

Browse files
committed
style and a11y fixes
1 parent 159e625 commit d959345

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

packages/compass-aggregations/src/components/pipeline-output-options-menu.tsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ const containerStyles = css({
1414
flex: 'none',
1515
});
1616

17+
const defaultTitle = 'Output Options';
18+
1719
export const PipelineOutputOptionsMenu: React.FunctionComponent<{
1820
onChangeOption: (option: PipelineOutputOption) => void;
1921
buttonText?: string;
@@ -24,11 +26,11 @@ export const PipelineOutputOptionsMenu: React.FunctionComponent<{
2426
data-testid="pipeline-output-options"
2527
actions={pipelineOptionsActions}
2628
onAction={onChangeOption}
27-
buttonText={buttonText ?? 'Output Options'}
29+
buttonText={buttonText ?? defaultTitle}
2830
buttonProps={{
2931
size: 'xsmall',
30-
title: buttonText ?? 'Output Options',
31-
['aria-label']: buttonText ?? 'Output Options',
32+
title: buttonText || defaultTitle,
33+
['aria-label']: buttonText || defaultTitle,
3234
}}
3335
></DropdownMenuButton>
3436
</div>

packages/compass-components/src/components/actions/dropdown-menu-button.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,9 @@ export function DropdownMenuButton<Action extends string>({
122122
data-testid={actionTestId(dataTestId, action)}
123123
data-action={action}
124124
data-menuitem={true}
125-
glyph={<ActionGlyph glyph={icon} size={iconSize} />}
125+
glyph={
126+
icon ? <ActionGlyph glyph={icon} size={iconSize} /> : undefined
127+
}
126128
onClick={onClick}
127129
>
128130
{label}

0 commit comments

Comments
 (0)