[8.x] fix: [Security:Manage:EntityAnalytics:EntityRiskScore] Entity Risk score on and off toggle button is missing discernible text on Entity Risk score page (#207362) (#210148)

# Backport

This will backport the following commits from `main` to `8.x`:
- [fix: [Security:Manage:EntityAnalytics:EntityRiskScore] Entity Risk
score on and off toggle button is missing discernible text on Entity
Risk score page
(#207362)](https://github.com/elastic/kibana/pull/207362)

<!--- Backport version: 9.6.4 -->

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

<!--BACKPORT [{"author":{"name":"Alexey
Antonov","email":"alexwizp@gmail.com"},"sourceCommit":{"committedDate":"2025-01-21T16:00:43Z","message":"fix:
[Security:Manage:EntityAnalytics:EntityRiskScore] Entity Risk score on
and off toggle button is missing discernible text on Entity Risk score
page (#207362)\n\nCloses: #205823\r\n\r\n**Description**\r\nEntity Risk
score on and off toggle button is missing discernible text\r\non entity
risk score page\r\n\r\n**Preconditions**\r\nSecurity -> Manage ->Entity
Risk Score page \r\n\r\n**Steps to reproduce**\r\n1. Open Entity Risk
score page\r\n2. Run axe-core through the page\r\n3. Notice that Entity
risk score on and off toggle button is missing\r\ndiscernible text which
means assistive technologies won't know what
to\r\nread.\r\n\r\n\r\n**Changes made**\r\n1. `arial-label` attribute
was set for `EuiSwitch`\r\n\r\n**Screen**\r\n\r\n<img width=\"1608\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/79754c08-9362-4095-81e2-7d0d65c67daf\"\r\n/>","sha":"d0c56b02fa3234f27a402fcf6c2dd802c67f2383","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Project:Accessibility","release_note:skip","backport
missing","v9.0.0","backport:prev-minor"],"title":"fix:
[Security:Manage:EntityAnalytics:EntityRiskScore] Entity Risk score on
and off toggle button is missing discernible text on Entity Risk score
page","number":207362,"url":"https://github.com/elastic/kibana/pull/207362","mergeCommit":{"message":"fix:
[Security:Manage:EntityAnalytics:EntityRiskScore] Entity Risk score on
and off toggle button is missing discernible text on Entity Risk score
page (#207362)\n\nCloses: #205823\r\n\r\n**Description**\r\nEntity Risk
score on and off toggle button is missing discernible text\r\non entity
risk score page\r\n\r\n**Preconditions**\r\nSecurity -> Manage ->Entity
Risk Score page \r\n\r\n**Steps to reproduce**\r\n1. Open Entity Risk
score page\r\n2. Run axe-core through the page\r\n3. Notice that Entity
risk score on and off toggle button is missing\r\ndiscernible text which
means assistive technologies won't know what
to\r\nread.\r\n\r\n\r\n**Changes made**\r\n1. `arial-label` attribute
was set for `EuiSwitch`\r\n\r\n**Screen**\r\n\r\n<img width=\"1608\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/79754c08-9362-4095-81e2-7d0d65c67daf\"\r\n/>","sha":"d0c56b02fa3234f27a402fcf6c2dd802c67f2383"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/207362","number":207362,"mergeCommit":{"message":"fix:
[Security:Manage:EntityAnalytics:EntityRiskScore] Entity Risk score on
and off toggle button is missing discernible text on Entity Risk score
page (#207362)\n\nCloses: #205823\r\n\r\n**Description**\r\nEntity Risk
score on and off toggle button is missing discernible text\r\non entity
risk score page\r\n\r\n**Preconditions**\r\nSecurity -> Manage ->Entity
Risk Score page \r\n\r\n**Steps to reproduce**\r\n1. Open Entity Risk
score page\r\n2. Run axe-core through the page\r\n3. Notice that Entity
risk score on and off toggle button is missing\r\ndiscernible text which
means assistive technologies won't know what
to\r\nread.\r\n\r\n\r\n**Changes made**\r\n1. `arial-label` attribute
was set for `EuiSwitch`\r\n\r\n**Screen**\r\n\r\n<img width=\"1608\"
alt=\"image\"\r\nsrc=\"https://github.com/user-attachments/assets/79754c08-9362-4095-81e2-7d0d65c67daf\"\r\n/>","sha":"d0c56b02fa3234f27a402fcf6c2dd802c67f2383"}}]}]
BACKPORT-->

Co-authored-by: Alexey Antonov <alexwizp@gmail.com>
This commit is contained in:
Abhishek Bhatia 2025-02-08 15:16:13 +05:30 committed by GitHub
parent b73a2cec6c
commit 61f355832b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 70 additions and 1 deletions

View file

@ -177,13 +177,14 @@ const RiskEngineStatusRow: React.FC<{
</EuiFlexItem>
<EuiFlexItem>
<EuiSwitch
label={''}
label={i18n.RISK_ENGINE_STATUS_SWITCH_LABEL}
data-test-subj="risk-score-switch"
checked={currentRiskEngineStatus === RiskEngineStatusEnum.ENABLED}
onChange={onSwitchClick}
compressed
disabled={btnIsDisabled}
aria-describedby={'switchRiskModule'}
showLabel={false}
/>
</EuiFlexItem>
</EuiFlexGroup>

View file

@ -288,3 +288,71 @@ export const RISK_SCORE_MODULE_TURNED_OFF = i18n.translate(
defaultMessage: 'Entity risk score has been turned off',
}
);
export const RISK_SCORE_ENGINE_RUN_SUCCESS = i18n.translate(
'xpack.securitySolution.riskScore.engineRunSuccess',
{
defaultMessage: 'Entity risk score engine started successfully',
}
);
export const RISK_ENGINE_SAVED_OBJECT_CONFIGURATION_SUCCESS = i18n.translate(
'xpack.securitySolution.riskScore.savedObject.configurationSuccess',
{
defaultMessage: 'Risk engine Saved Object configuration updated successfully',
}
);
export const INCLUDE_CLOSED_ALERTS_LABEL = i18n.translate(
'xpack.securitySolution.riskScore.includeClosedAlertsLabel',
{
defaultMessage: 'Include closed alerts for risk scoring',
}
);
export const RISK_ENGINE_INCLUDE_CLOSED_ALERTS_DESCRIPTION = i18n.translate(
'xpack.securitySolution.riskScore.includeClosedAlertsDescription',
{
defaultMessage: `Enable this option to factor both open and closed alerts into the risk engine
calculations. Including closed alerts helps provide a more comprehensive risk assessment
based on past incidents, leading to more accurate scoring and insights.`,
}
);
export const RISK_ENGINE_NEXT_RUN_TIME = (timeInMinutes: string) =>
i18n.translate('xpack.securitySolution.riskScore.engineNextRunTime', {
defaultMessage: `Next engine run in {timeInMinutes}`,
values: { timeInMinutes },
});
export const RISK_ENGINE_STATUS_SWITCH_LABEL = i18n.translate(
'xpack.securitySolution.riskScore.riskEngineStatus',
{
defaultMessage: 'Risk engine status',
}
);
export const RUN_RISK_SCORE_ENGINE = i18n.translate('xpack.securitySolution.riskScore.runEngine', {
defaultMessage: 'Run Engine',
});
export const SAVE_CHANGES = i18n.translate(
'xpack.securitySolution.riskScore.engineSavedObjectsaveChanges',
{
defaultMessage: 'Save',
}
);
export const DISCARD_CHANGES = i18n.translate(
'xpack.securitySolution.riskScore.engineSavedObject.discardChanges',
{
defaultMessage: 'Discard',
}
);
export const RISK_SCORE_ENGINE_RUN_FAILURE = i18n.translate(
'xpack.securitySolution.riskScore.engineRunSuccess',
{
defaultMessage: 'Entity risk score engine failed to start',
}
);