mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
fix: [Integrations > Kubernetes integration detail][BUG]: Empty button is throwing an axe-core error (#179938)
Closes: https://github.com/elastic/security-team/issues/9013
## Description
The Kubernetes integration detail has an empty button being rendered
that is causing axe-core to throw an error for a button without
discernible text. Screenshot attached.
### Steps to recreate
1. Create a new Security Serverless project if none exist
2. When the project is ready, open it and go to Integrations, under the
Project Settings in the lower left navigation
3. Search for Kubernetes in the Integrations, and click on the card
4. When the view loads, open DevTools and run an axe-core check
5. Verify the empty button is present
### What was done?:
- `renderItem` property was added to skip rendering for empty items
### Screen
#### a11y tree
<img width="1579" alt="image"
src="11d6550f
-fa28-4a72-859f-10a427d4f8a9">
This commit is contained in:
parent
658cbde817
commit
2c405897ea
1 changed files with 2 additions and 0 deletions
|
@ -214,6 +214,8 @@ export const OverviewPage: React.FC<Props> = memo(
|
|||
isSelected: selectedItemId === id,
|
||||
onClick: () => selectItem(id),
|
||||
...options,
|
||||
// skip rendering empty items while preserving the header hierarchy
|
||||
renderItem: name === '' ? () => null : undefined,
|
||||
};
|
||||
},
|
||||
[selectedItemId]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue