Skip to content

Commit

Permalink
fix: [Security:Rules:Detection Rules:Create Rule] Time input interval…
Browse files Browse the repository at this point in the history
… spinner for timeperiod input to suppress alerts is missing form label

Closes: elastic#204498
  • Loading branch information
alexwizp committed Jan 2, 2025
1 parent d209afd commit 590ef74
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ const SuppressionDurationSelectorFields = memo(function SuppressionDurationSelec
disabled ||
suppressionDurationSelectorField.value !== AlertSuppressionDurationType.PerTimePeriod
}
aria-label={i18n.ALERT_SUPPRESSION_DURATION_PER_TIME_PERIOD_OPTION}
minimumValue={1}
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ interface DurationInputProps {
minimumValue?: number;
isDisabled: boolean;
durationUnitOptions?: Array<{ value: 's' | 'm' | 'h' | 'd'; text: string }>;
'aria-label'?: string;
}

// This component is similar to the ScheduleItem component, but instead of combining the value
Expand All @@ -33,6 +34,7 @@ export const DurationInput = memo(function DurationInputComponent({
{ value: 'm', text: I18n.MINUTES },
{ value: 'h', text: I18n.HOURS },
],
'aria-label': ariaLabel,
...props
}: DurationInputProps): JSX.Element {
const { euiTheme } = useEuiTheme();
Expand Down Expand Up @@ -98,6 +100,7 @@ export const DurationInput = memo(function DurationInputComponent({
onChange={onChangeTimeVal}
value={durationValue}
data-test-subj="interval"
aria-label={ariaLabel}
{...rest}
/>
</EuiFormRow>
Expand Down

0 comments on commit 590ef74

Please sign in to comment.