-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: [Obs Alert Rules > Rule Detail][KEYBOARD]: N Alerts and N Active Now elems must both be keyboard focsuable #186529
Conversation
… Now elems must both be keyboard focsuable Closes: elastic/observability-dev#3371
/ci |
/ci |
/ci |
/ci |
Pinging @elastic/kibana-accessibility (Project:Accessibility) |
This implementation was based on the original design by @maciejforcone. |
I think the problem here is that this was a widget to place in other observability areas, like service details, host details, etc, in compact format, almost like button size. In rule it's a bit different story. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM, I've just added a nit. Thanks for fixing this!
I am going to test locally now.
...tions_ui/public/application/sections/alert_summary_widget/components/active_alert_counts.tsx
Outdated
Show resolved
Hide resolved
event: MouseEvent<HTMLAnchorElement | HTMLDivElement>, | ||
status?: AlertStatus | ||
) => void; | ||
} | ||
|
||
export const AlertCounts = ({ activeAlertCount, recoveredAlertCount, onActiveClick }: Props) => { | ||
/** @internal **/ | ||
const AlertItem = ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: What about moving this logic to a separate file and then using it directly in AllAlertCounts
and ActiveAlertCounts
?
In that case, we can also move onAllClick
and onActiveClick
to the respective components.
In the current implementation, we have some parts of the allAlerts/activeAlerts logic here and some parts of it in the children components.
So, in the end, the component here will look something like:
<EuiFlexGroup gutterSize="l" responsive={false}>
<AllAlertCounts count={activeAlertCount + recoveredAlertCount} onClick={onAllClick} data-test-subj="allAlerts" />
<ActiveAlertCounts activeAlertCount={activeAlertCount} onClick={onActiveClick} data-test-subj="activeAlerts" />
</EuiFlexGroup>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@maryam-saeidi, could you please review the latest changes? I'm unsure if we need both AllAlertCounts
and ActiveAlertCounts
. I've decided to retain only AlertItem
to remove duplication.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested locally and worked as expected!
@elastic/response-ops please review |
@elastic/response-ops please review |
@elastic/response-ops please review |
@elastic/response-ops please review |
💛 Build succeeded, but was flaky
Failed CI StepsMetrics [docs]Module Count
Page load bundle
History
|
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Module Count
Page load bundle
History
To update your PR or re-run it, just comment with: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and works as expected 👍
Closes: https://github.com/elastic/observability-dev/issues/3371
Description
The Obs Alert Rule Detail view has a card that is clickable with a focusable element inside it. This is a confusing paradigm and prevents keyboard users from filtering by all alerts because it's not focusable. It would be better to make the two alert number widgets the focusable elements. Screenshot attached below.
PR is based on the following comment posted by @1Copenut in https://github.com/elastic/observability-dev/issues/3371#issuecomment-2129446431_
Steps to recreate
1 Active Now
What was done?:
All alerts.
aria-describedby
attributes were added forAllAlertCounts
andActiveAlertCounts
h3
attributes were replaced toEuiTitle
inAllAlertCounts
andActiveAlertCounts