Skip to content

Commit

Permalink
fix(slo): Aria labels (elastic#177202)
Browse files Browse the repository at this point in the history
  • Loading branch information
kdelemme authored Feb 19, 2024
1 parent 9e6db9b commit 2e6150c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,7 @@ export function SloEditFormIndicatorSection({ isEditMode }: SloEditFormIndicator
>
{!isEditMode && (
<>
<EuiFormRow
label={i18n.translate('xpack.observability.slo.sloEdit.definition.sliType', {
defaultMessage: 'Choose the SLI type',
})}
>
<EuiFormRow label={indicatorLabel}>
<Controller
name="indicator.type"
control={control}
Expand All @@ -74,6 +70,7 @@ export function SloEditFormIndicatorSection({ isEditMode }: SloEditFormIndicator
required
data-test-subj="sloFormIndicatorTypeSelect"
options={SLI_OPTIONS}
aria-label={indicatorLabel}
/>
)}
/>
Expand All @@ -85,3 +82,7 @@ export function SloEditFormIndicatorSection({ isEditMode }: SloEditFormIndicator
</EuiPanel>
);
}

const indicatorLabel = i18n.translate('xpack.observability.slo.sloEdit.definition.sliType', {
defaultMessage: 'Choose the SLI type',
});
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,15 @@ export function SLOContextMenu({
<span>{label}</span>
</EuiTitle>
</EuiFlexItem>
<EuiFlexItem grow={false} data-test-subj="syntheticsOverviewGroupButton">
<EuiFlexItem grow={false} data-test-subj="sloOverviewGroupButton">
<EuiPopover
id={singleContextMenuPopoverId}
button={button}
isOpen={isPopoverOpen}
closePopover={() => setIsPopoverOpen(false)}
panelPaddingSize="none"
anchorPosition="downLeft"
aria-label={label}
>
<EuiContextMenuPanel size="s" items={items} style={{ minWidth: 160 }} />
</EuiPopover>
Expand All @@ -114,6 +115,7 @@ export function ContextMenuItem({
return (
<EuiContextMenuItem
size="s"
aria-label={option.label}
key={option.value}
icon={getIconType(option.checked)}
onClick={() => {
Expand Down

0 comments on commit 2e6150c

Please sign in to comment.