mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
fix: [Rules][AXE-CORE]: Links must have discernible text (#177198)
Closes: https://github.com/elastic/security-team/issues/8565 ## Summary The [axe browser plugin](https://deque.com/axe) has identified four links without clear text. Upon inspecting the page, it was found that the SVG icons associated with each rule type are labeled as <a> but with a negative tabindex, rendering them inaccessible for keyboard navigation. Additionally, these icons lack an accessible label. To address this issue, the <a> tag for the SVG icons has been removed. SVGs inherently possess the appropriate role and aria-hidden attributes, designating them as decorative elements for assistive technology. ### Screen  ### AXE Report #### Before  #### After  ## For discussion only Alternatively I recommend to refactor LandingLinkIcon component to use `EuiCard` to make it more EUI friendly e.g. <img width="1308" alt="image" src="ca76191f
-bec7-473b-af73-838fcdee76af"> POC: [Alternative fix for](69c9375192
)
This commit is contained in:
parent
aecbb9c23b
commit
4e30d4bb36
1 changed files with 1 additions and 9 deletions
|
@ -54,15 +54,7 @@ export const LandingLinkIcon: React.FC<LandingLinkIconProps> = React.memo(functi
|
|||
data-test-subj="LandingItem"
|
||||
>
|
||||
<EuiFlexItem grow={false}>
|
||||
<LandingLink
|
||||
tabIndex={-1} // Prevents the icon from being tabbable
|
||||
item={item}
|
||||
urlState={urlState}
|
||||
onLinkClick={onLinkClick}
|
||||
external={false} // Never show the external icon
|
||||
>
|
||||
<EuiIcon aria-hidden="true" size="xl" type={landingIcon ?? ''} role="presentation" />
|
||||
</LandingLink>
|
||||
<EuiIcon aria-hidden="true" size="xl" type={landingIcon ?? ''} role="presentation" />
|
||||
</EuiFlexItem>
|
||||
<EuiFlexItem grow={false}>
|
||||
<EuiTitle size="xxs" css={styles.title}>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue