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


![image](32ae0237-9b89-40e6-8201-416a1f2d4f17)

### AXE Report

#### Before


![image](8e51168c-2028-422d-af9e-0c4f5aaeb467)


#### After


![image](57b4aa67-84ee-4b46-96c2-d9ccaa49812d)



## 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:
Alexey Antonov 2024-02-22 14:30:58 +02:00 committed by GitHub
parent aecbb9c23b
commit 4e30d4bb36
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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}>