Skip to content
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: [Rules > Detection rules][AXE-CORE]: Buttons must have discernible text #177273

Merged
merged 2 commits into from
Feb 22, 2024

Conversation

alexwizp
Copy link
Contributor

@alexwizp alexwizp commented Feb 20, 2024

Closes: https://github.com/elastic/security-team/issues/8566
Closes: https://github.com/elastic/security-team/issues/8569

Description

The <RuleSwitch /> component is currently flagged by the axe browser plugin for lacking text or an accessible label in its button switch. This pull request introduces support for the addition of the aria-label attribute to address this issue. Additionally, adjustments are made in two instances where this component is utilized within the codebase.

Screens

Axe report

image

A11y label

image

@alexwizp alexwizp added Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v8.14.0 release_note:skip Skip the PR/issue when compiling release notes labels Feb 20, 2024
@alexwizp alexwizp marked this pull request as ready for review February 20, 2024 19:42
@alexwizp alexwizp requested a review from a team as a code owner February 20, 2024 19:42
@alexwizp alexwizp requested a review from nikitaindik February 20, 2024 19:42
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@alexwizp
Copy link
Contributor Author

@elasticmachine merge upstream

@banderror banderror requested review from banderror and removed request for nikitaindik February 21, 2024 10:31
@banderror banderror added Team:Detections and Resp Security Detection Response Team Feature:Rule Management Security Solution Detection Rule Management area Team:Detection Rule Management Security Detection Rule Management Team Feature:Rule Details Security Solution Detection Rule Details page v8.13.0 labels Feb 21, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detections-response (Team:Detections and Resp)

@elasticmachine
Copy link
Contributor

Pinging @elastic/security-detection-rule-management (Team:Detection Rule Management)

@alexwizp alexwizp changed the title [Rules > Detection rules][AXE-CORE]: Buttons must have discernible text fix: [Rules > Detection rules][AXE-CORE]: Buttons must have discernible text Feb 21, 2024
Copy link
Contributor

@banderror banderror left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @alexwizp, left a few suggestions.

Copy link
Contributor

@banderror banderror left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexwizp Thank you for addressing my suggestions and adding unit tests. One last comment and we'll be ready to merge it 👍

@alexwizp alexwizp requested a review from banderror February 22, 2024 14:36
@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
securitySolution 5003 5004 +1

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
securitySolution 11.6MB 11.6MB +478.0B

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@alexwizp alexwizp enabled auto-merge (squash) February 22, 2024 16:53
Copy link
Contributor

@banderror banderror left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the fixes @alexwizp. LGTM 👍

@alexwizp alexwizp merged commit 3db4a8f into elastic:main Feb 22, 2024
39 checks passed
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Feb 22, 2024
…le text (elastic#177273)

Closes: elastic/security-team#8566
Closes: elastic/security-team#8569

## Description
The `<RuleSwitch />` component is currently flagged by the axe browser
plugin for lacking text or an accessible label in its button switch.
This pull request introduces support for the addition of the
`aria-label` attribute to address this issue. Additionally, adjustments
are made in two instances where this component is utilized within the
codebase.

## Screens

### Axe report

![image](https://github.com/elastic/kibana/assets/20072247/36287d4f-fd98-4b26-b313-a39a72aefb81)

### A11y label

![image](https://github.com/elastic/kibana/assets/20072247/c61c9d0d-dd6e-4af2-9d43-04e86ad21954)

(cherry picked from commit 3db4a8f)
@kibanamachine
Copy link
Contributor

💚 All backports created successfully

Status Branch Result
8.13

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Feb 22, 2024
… discernible text (#177273) (#177636)

# Backport

This will backport the following commits from `main` to `8.13`:
- [fix: [Rules &gt; Detection rules][AXE-CORE]: Buttons must have
discernible text
(#177273)](#177273)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Alexey
Antonov","email":"alexwizp@gmail.com"},"sourceCommit":{"committedDate":"2024-02-22T18:33:10Z","message":"fix:
[Rules > Detection rules][AXE-CORE]: Buttons must have discernible text
(#177273)\n\nCloses:
https://github.com/elastic/security-team/issues/8566\r\nCloses:
https://github.com/elastic/security-team/issues/8569\r\n\r\n##
Description\r\nThe `<RuleSwitch />` component is currently flagged by
the axe browser\r\nplugin for lacking text or an accessible label in its
button switch.\r\nThis pull request introduces support for the addition
of the\r\n`aria-label` attribute to address this issue. Additionally,
adjustments\r\nare made in two instances where this component is
utilized within the\r\ncodebase.\r\n\r\n## Screens \r\n\r\n### Axe
report
\r\n\r\n![image](https://github.com/elastic/kibana/assets/20072247/36287d4f-fd98-4b26-b313-a39a72aefb81)\r\n\r\n###
A11y label
\r\n\r\n![image](https://github.com/elastic/kibana/assets/20072247/c61c9d0d-dd6e-4af2-9d43-04e86ad21954)","sha":"3db4a8fa98b0e6968d40476505b6497559682fe5","branchLabelMapping":{"^v8.14.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:Detections
and Resp","Team: SecuritySolution","Feature:Rule
Management","Team:Detection Rule Management","Feature:Rule
Details","v8.13.0","v8.14.0"],"title":"fix: [Rules > Detection
rules][AXE-CORE]: Buttons must have discernible
text","number":177273,"url":"https://github.com/elastic/kibana/pull/177273","mergeCommit":{"message":"fix:
[Rules > Detection rules][AXE-CORE]: Buttons must have discernible text
(#177273)\n\nCloses:
https://github.com/elastic/security-team/issues/8566\r\nCloses:
https://github.com/elastic/security-team/issues/8569\r\n\r\n##
Description\r\nThe `<RuleSwitch />` component is currently flagged by
the axe browser\r\nplugin for lacking text or an accessible label in its
button switch.\r\nThis pull request introduces support for the addition
of the\r\n`aria-label` attribute to address this issue. Additionally,
adjustments\r\nare made in two instances where this component is
utilized within the\r\ncodebase.\r\n\r\n## Screens \r\n\r\n### Axe
report
\r\n\r\n![image](https://github.com/elastic/kibana/assets/20072247/36287d4f-fd98-4b26-b313-a39a72aefb81)\r\n\r\n###
A11y label
\r\n\r\n![image](https://github.com/elastic/kibana/assets/20072247/c61c9d0d-dd6e-4af2-9d43-04e86ad21954)","sha":"3db4a8fa98b0e6968d40476505b6497559682fe5"}},"sourceBranch":"main","suggestedTargetBranches":["8.13"],"targetPullRequestStates":[{"branch":"8.13","label":"v8.13.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.14.0","branchLabelMappingKey":"^v8.14.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/177273","number":177273,"mergeCommit":{"message":"fix:
[Rules > Detection rules][AXE-CORE]: Buttons must have discernible text
(#177273)\n\nCloses:
https://github.com/elastic/security-team/issues/8566\r\nCloses:
https://github.com/elastic/security-team/issues/8569\r\n\r\n##
Description\r\nThe `<RuleSwitch />` component is currently flagged by
the axe browser\r\nplugin for lacking text or an accessible label in its
button switch.\r\nThis pull request introduces support for the addition
of the\r\n`aria-label` attribute to address this issue. Additionally,
adjustments\r\nare made in two instances where this component is
utilized within the\r\ncodebase.\r\n\r\n## Screens \r\n\r\n### Axe
report
\r\n\r\n![image](https://github.com/elastic/kibana/assets/20072247/36287d4f-fd98-4b26-b313-a39a72aefb81)\r\n\r\n###
A11y label
\r\n\r\n![image](https://github.com/elastic/kibana/assets/20072247/c61c9d0d-dd6e-4af2-9d43-04e86ad21954)","sha":"3db4a8fa98b0e6968d40476505b6497559682fe5"}}]}]
BACKPORT-->

Co-authored-by: Alexey Antonov <alexwizp@gmail.com>
fkanout pushed a commit to fkanout/kibana that referenced this pull request Mar 4, 2024
…le text (elastic#177273)

Closes: elastic/security-team#8566
Closes: elastic/security-team#8569

## Description
The `<RuleSwitch />` component is currently flagged by the axe browser
plugin for lacking text or an accessible label in its button switch.
This pull request introduces support for the addition of the
`aria-label` attribute to address this issue. Additionally, adjustments
are made in two instances where this component is utilized within the
codebase.

## Screens 

### Axe report 

![image](https://github.com/elastic/kibana/assets/20072247/36287d4f-fd98-4b26-b313-a39a72aefb81)

### A11y label 

![image](https://github.com/elastic/kibana/assets/20072247/c61c9d0d-dd6e-4af2-9d43-04e86ad21954)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Rule Details Security Solution Detection Rule Details page Feature:Rule Management Security Solution Detection Rule Management area release_note:skip Skip the PR/issue when compiling release notes Team:Detection Rule Management Security Detection Rule Management Team Team:Detections and Resp Security Detection Response Team Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v8.13.0 v8.14.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants