From ef1185822541741f372b22ccb692269a09e8dad0 Mon Sep 17 00:00:00 2001
From: Copilot <198982749+Copilot@users.noreply.github.com>
Date: Tue, 14 Apr 2026 22:10:47 +0300
Subject: [PATCH] Fix `@elastic/eui/require-aria-label-for-modals` lint
violations in osquery plugin (#263060)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Closes: https://github.com/elastic/kibana/issues/263059
Fixes 13 `@elastic/eui/require-aria-label-for-modals` ESLint violations
across the osquery plugin (`@elastic/security-defend-workflows`).
### EuiFlyout
- `add_tags_flyout.tsx` — Added `aria-labelledby` linked to the `
`
heading via `useGeneratedHtmlId`
### EuiConfirmModal
- `use_duplicate_guard.tsx` — Added `aria-labelledby` + `titleProps` via
`useGeneratedHtmlId`
### EuiPopover (11 files)
Added `aria-label` using existing i18n labels already in scope:
- `run_by_filter_popover.tsx`, `source_filter_popover.tsx`,
`tags_column.tsx`, `tags_filter_popover.tsx`,
`column_picker_popover.tsx`, `created_by_filter_popover.tsx`,
`selectable_filter_popover.tsx`, `sort_fields_popover.tsx` — reuse
module-level i18n constants
- `row_actions_menu.tsx`, `row_kebab_menu.tsx` — reuse the button's
`aria-label` prop
- `packs_table.tsx` — new `i18n.translate` (no existing label available)
Example pattern for popovers:
```tsx
```
Example pattern for flyout:
```tsx
const flyoutTitleId = useGeneratedHtmlId();
// ...
{/* ← added */}
…
{/* ← id added */}
```
> [!WARNING]
>
>
> Firewall rules blocked me from connecting to one or more
addresses (expand for details)
>
> #### I tried to connect to the following addresses, but was blocked by
firewall rules:
>
> - `ci-stats.kibana.dev`
> - Triggering command: `/usr/local/n/versions/node/22.22.0/bin/node
/usr/local/n/versions/node/22.22.0/bin/node
scripts/yarn_install_scripts.js run ldd 0.8.2
nibrowser-gtk/sys/lib/libbrotlienc.so.1` (dns block)
> - Triggering command: `/usr/local/n/versions/node/22.22.0/bin/node
/usr/local/n/versions/node/22.22.0/bin/node scripts/kbn bootstrap` (dns
block)
> - Triggering command: `/usr/local/n/versions/node/22.22.0/bin/node
node scripts/eslint --no-cache --rule
{"@elastic/eui/require-aria-label-for-modals": "error"}
x-pack/platform/plugins/shared/osquery/public/actions/components/add_tags_flyout.tsx
x-pack/platform/plugins/shared/osquery/public/actions/components/run_by_filter_popover.tsx
x-pack/platform/plugins/shared/osquery/public/actions/components/source_filter_popover.tsx
x-pack/platform/plugins/shared/osquery/public/actions/components/tags_column.tsx
x-pack/platform/plugins/shared/osquery/public/actions/components/tags_filter_popover.tsx
x-pack/platform/plugins/shared/osquery/public/common/hooks/use_duplicate_guard.tsx
x-pack/platform/plugins/shared/osquery/public/components/row_actions_menu.tsx
x-pack/platform/plugins/shared/osquery/public/components/table_toolbar/column_picker_popover.tsx
x-pack/platform/plugins/shared/osquery/public/components/table_toolbar/created_by_filter_popover.tsx
x-pack/platform/plugins/shared/osquery/public/components/table_toolbar/selectable_filter_popover.tsx
x-pack/platform/plugins/shared/osquery/public/components/table_toolbar/sort_fields_popover.tsx
x-pack/platform/plugins/shared/osquery/public/live_queries/form/row_kebab_menu.tsx
x-pack/platform/plugins/shared/osquery/public/packs/packs_table.tsx
cal/bin/git ldd` (dns block)
> - `clients3.google.com`
> - Triggering command:
`/home/REDACTED/work/kibana/kibana/node_modules/@moonrepo/core-linux-x64-gnu/moon
/home/REDACTED/work/kibana/kibana/node_modules/@moonrepo/core-linux-x64-gnu/moon
run :build-webpack /lib64/ld-linux-x86-64.so.2 b/li
/home/REDACTED/.cache/ms-playwright/firefox-1511/firefox/glxtest` (dns
block)
> - `detectportal.firefox.com`
> - Triggering command:
`/home/REDACTED/work/kibana/kibana/node_modules/@moonrepo/core-linux-x64-gnu/moon
/home/REDACTED/work/kibana/kibana/node_modules/@moonrepo/core-linux-x64-gnu/moon
run :build-webpack /lib64/ld-linux-x86-64.so.2 b/li
/home/REDACTED/.cache/ms-playwright/firefox-1511/firefox/glxtest` (dns
block)
> - `google.com`
> - Triggering command:
`/home/REDACTED/work/kibana/kibana/node_modules/@moonrepo/core-linux-x64-gnu/moon
/home/REDACTED/work/kibana/kibana/node_modules/@moonrepo/core-linux-x64-gnu/moon
run :build-webpack /lib64/ld-linux-x86-64.so.2 b/li
/home/REDACTED/.cache/ms-playwright/firefox-1511/firefox/glxtest` (dns
block)
> - `googlechromelabs.github.io`
> - Triggering command: `/usr/local/n/versions/node/22.22.0/bin/node
/usr/local/n/versions/node/22.22.0/bin/node install.js de/node/bin/git
ldd b/li` (dns block)
>
> If you need me to access, download, or install something from one of
these locations, you can either:
>
> - Configure [Actions setup
steps](https://gh.io/copilot/actions-setup-steps) to set up my
environment, which run before the firewall is enabled
> - Add the appropriate URLs or hosts to the custom allowlist in this
repository's [Copilot coding agent
settings](https://github.com/elastic/kibana/settings/copilot/coding_agent)
(admins only)
>
>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: alexwizp <20072247+alexwizp@users.noreply.github.com>
Co-authored-by: Alexey Antonov
(cherry picked from commit 318e2dcb839e74ed4d2bf44e98a8c0a7d5dfa02e)
---
.../public/actions/components/add_tags_flyout.tsx | 6 ++++--
.../public/actions/components/run_by_filter_popover.tsx | 1 +
.../public/actions/components/source_filter_popover.tsx | 1 +
.../osquery/public/actions/components/tags_column.tsx | 1 +
.../public/actions/components/tags_filter_popover.tsx | 1 +
.../osquery/public/common/hooks/use_duplicate_guard.tsx | 7 ++++++-
.../osquery/public/components/row_actions_menu.tsx | 1 +
.../components/table_toolbar/column_picker_popover.tsx | 1 +
.../table_toolbar/created_by_filter_popover.tsx | 1 +
.../table_toolbar/selectable_filter_popover.tsx | 1 +
.../components/table_toolbar/sort_fields_popover.tsx | 1 +
.../osquery/public/live_queries/form/row_kebab_menu.tsx | 1 +
.../plugins/shared/osquery/public/packs/packs_table.tsx | 9 ++++++++-
13 files changed, 28 insertions(+), 4 deletions(-)
diff --git a/x-pack/platform/plugins/shared/osquery/public/actions/components/add_tags_flyout.tsx b/x-pack/platform/plugins/shared/osquery/public/actions/components/add_tags_flyout.tsx
index 68b26ee4dd68f..9eb8945e8cb32 100644
--- a/x-pack/platform/plugins/shared/osquery/public/actions/components/add_tags_flyout.tsx
+++ b/x-pack/platform/plugins/shared/osquery/public/actions/components/add_tags_flyout.tsx
@@ -19,6 +19,7 @@ import {
EuiFormRow,
EuiComboBox,
EuiText,
+ useGeneratedHtmlId,
} from '@elastic/eui';
import type { EuiComboBoxOptionOption } from '@elastic/eui';
import { i18n } from '@kbn/i18n';
@@ -68,6 +69,7 @@ const AddTagsFlyoutComponent: React.FC = ({
onClose,
onSave,
}) => {
+ const flyoutTitleId = useGeneratedHtmlId();
const [localTags, setLocalTags] = useState(currentTags);
const { tags: availableTags } = useHistoryTags();
const { mutate: updateTags, isLoading: isSaving } = useUpdateActionTags();
@@ -125,10 +127,10 @@ const AddTagsFlyoutComponent: React.FC = ({
}, [actionId, localTags, updateTags, onSave, onClose]);
return (
-
+
- {FLYOUT_TITLE}
+ {FLYOUT_TITLE}
diff --git a/x-pack/platform/plugins/shared/osquery/public/actions/components/run_by_filter_popover.tsx b/x-pack/platform/plugins/shared/osquery/public/actions/components/run_by_filter_popover.tsx
index bf85329429fff..a0627f0e77de2 100644
--- a/x-pack/platform/plugins/shared/osquery/public/actions/components/run_by_filter_popover.tsx
+++ b/x-pack/platform/plugins/shared/osquery/public/actions/components/run_by_filter_popover.tsx
@@ -145,6 +145,7 @@ const RunByFilterPopoverComponent: React.FC = ({
panelPaddingSize="none"
repositionOnScroll
panelProps={PANEL_PROPS}
+ aria-label={RUN_BY_LABEL}
>
= ({
panelPaddingSize="none"
repositionOnScroll
panelProps={PANEL_PROPS}
+ aria-label={SOURCE_LABEL}
>
{(list) => {list}
}
diff --git a/x-pack/platform/plugins/shared/osquery/public/actions/components/tags_column.tsx b/x-pack/platform/plugins/shared/osquery/public/actions/components/tags_column.tsx
index 02eec13bdbd48..65d26a0851de0 100644
--- a/x-pack/platform/plugins/shared/osquery/public/actions/components/tags_column.tsx
+++ b/x-pack/platform/plugins/shared/osquery/public/actions/components/tags_column.tsx
@@ -62,6 +62,7 @@ const TagsColumnComponent: React.FC = ({ tags }) => {
closePopover={closePopover}
repositionOnScroll
data-test-subj="tagsColumnPopover"
+ aria-label={POPOVER_TITLE}
>
{POPOVER_TITLE}
diff --git a/x-pack/platform/plugins/shared/osquery/public/actions/components/tags_filter_popover.tsx b/x-pack/platform/plugins/shared/osquery/public/actions/components/tags_filter_popover.tsx
index f5ba682f85d10..8f6aeca4456f6 100644
--- a/x-pack/platform/plugins/shared/osquery/public/actions/components/tags_filter_popover.tsx
+++ b/x-pack/platform/plugins/shared/osquery/public/actions/components/tags_filter_popover.tsx
@@ -110,6 +110,7 @@ const TagsFilterPopoverComponent: React.FC = ({
panelPaddingSize="none"
repositionOnScroll
panelProps={PANEL_PROPS}
+ aria-label={TAGS_LABEL}
>
{
+ const confirmModalTitleId = useGeneratedHtmlId();
const bodyText = useMemo(
() =>
i18n.translate('xpack.osquery.duplicateConfirmation.body', {
@@ -48,8 +49,12 @@ export const useDuplicateGuard = ({ copyMutation, resourceType }: UseDuplicateGu
setIsFormDirty(isDirty);
}, []);
+ const titleProps = useMemo(() => ({ id: confirmModalTitleId }), [confirmModalTitleId]);
+
const duplicateModal = isDuplicateModalVisible ? (
= ({
closePopover={closePopover}
panelPaddingSize="none"
anchorPosition="leftCenter"
+ aria-label={actionsAriaLabel}
>
diff --git a/x-pack/platform/plugins/shared/osquery/public/components/table_toolbar/column_picker_popover.tsx b/x-pack/platform/plugins/shared/osquery/public/components/table_toolbar/column_picker_popover.tsx
index a7b1739b12a67..1d09d6e690969 100644
--- a/x-pack/platform/plugins/shared/osquery/public/components/table_toolbar/column_picker_popover.tsx
+++ b/x-pack/platform/plugins/shared/osquery/public/components/table_toolbar/column_picker_popover.tsx
@@ -87,6 +87,7 @@ const ColumnPickerPopoverComponent: React.FC = ({
panelPaddingSize="none"
repositionOnScroll
panelProps={panelProps}
+ aria-label={COLUMNS_LABEL}
>
{(list) => (
diff --git a/x-pack/platform/plugins/shared/osquery/public/components/table_toolbar/created_by_filter_popover.tsx b/x-pack/platform/plugins/shared/osquery/public/components/table_toolbar/created_by_filter_popover.tsx
index 69a998ae9a27f..acad7fc405dec 100644
--- a/x-pack/platform/plugins/shared/osquery/public/components/table_toolbar/created_by_filter_popover.tsx
+++ b/x-pack/platform/plugins/shared/osquery/public/components/table_toolbar/created_by_filter_popover.tsx
@@ -135,6 +135,7 @@ const CreatedByFilterPopoverComponent: React.FC = (
panelPaddingSize="none"
repositionOnScroll
panelProps={panelProps}
+ aria-label={CREATED_BY_LABEL}
>
=
panelPaddingSize="none"
repositionOnScroll
panelProps={panelProps}
+ aria-label={label}
>
{(list) => {list}
}
diff --git a/x-pack/platform/plugins/shared/osquery/public/components/table_toolbar/sort_fields_popover.tsx b/x-pack/platform/plugins/shared/osquery/public/components/table_toolbar/sort_fields_popover.tsx
index 78c235b5ffcb6..cf0d53e2d9ea5 100644
--- a/x-pack/platform/plugins/shared/osquery/public/components/table_toolbar/sort_fields_popover.tsx
+++ b/x-pack/platform/plugins/shared/osquery/public/components/table_toolbar/sort_fields_popover.tsx
@@ -127,6 +127,7 @@ const SortFieldsPopoverComponent: React.FC = ({
panelPaddingSize="none"
repositionOnScroll
panelProps={panelProps}
+ aria-label={SORT_FIELDS_LABEL}
>
diff --git a/x-pack/platform/plugins/shared/osquery/public/live_queries/form/row_kebab_menu.tsx b/x-pack/platform/plugins/shared/osquery/public/live_queries/form/row_kebab_menu.tsx
index 26148ff4bc745..5bab2cbe0214d 100644
--- a/x-pack/platform/plugins/shared/osquery/public/live_queries/form/row_kebab_menu.tsx
+++ b/x-pack/platform/plugins/shared/osquery/public/live_queries/form/row_kebab_menu.tsx
@@ -95,6 +95,7 @@ const RowKebabMenuContent: React.FC = React.memo(
closePopover={close}
panelPaddingSize="none"
anchorPosition="downLeft"
+ aria-label={kebabLabel}
>
diff --git a/x-pack/platform/plugins/shared/osquery/public/packs/packs_table.tsx b/x-pack/platform/plugins/shared/osquery/public/packs/packs_table.tsx
index b3a2644286406..81e9014d9e1a5 100644
--- a/x-pack/platform/plugins/shared/osquery/public/packs/packs_table.tsx
+++ b/x-pack/platform/plugins/shared/osquery/public/packs/packs_table.tsx
@@ -72,7 +72,14 @@ export const AgentPoliciesPopover = ({ agentPolicyIds = [] }: { agentPolicyIds?:
}
return (
-
+
{agentPolicyIds?.map((policyId) => (