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

[ML] [Accessibility] Add job ID to select row checkbox aria-label in Jobs List #40149

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import {
EuiButtonIcon,
} from '@elastic/eui';
import { injectI18n } from '@kbn/i18n/react';
import { i18n } from '@kbn/i18n';

const PAGE_SIZE = 10;
const PAGE_SIZE_OPTIONS = [10, 25, 50];
Expand Down Expand Up @@ -102,10 +103,27 @@ class JobsListUI extends Component {
const { intl, loading } = this.props;
const selectionControls = {
selectable: job => (job.deleting !== true),
selectableMessage: (selectable) => (!selectable) ? intl.formatMessage({
id: 'xpack.ml.jobsList.cannotSelectJobTooltip',
defaultMessage: 'Cannot select job' })
: undefined,
selectableMessage: (selectable, rowItem) => (
(selectable === false)
? i18n.translate(
'xpack.ml.jobsList.cannotSelectRowForJobMessage',
{
defaultMessage: 'Cannot select job ID {jobId}',
values: {
jobId: rowItem.id,
}
}
)
: i18n.translate(
'xpack.ml.jobsList.selectRowForJobMessage',
{
defaultMessage: 'Select the row for job ID {jobId}',
values: {
jobId: rowItem.id,
}
}
)
),
onSelectionChange: this.props.selectJobChange
};

Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/translations/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -6647,7 +6647,6 @@
"xpack.ml.jobsList.actionExecuteSuccessfullyNotificationMessage": "{successesJobsCount, plural, one{{successJob}} other{# 件のジョブ}} {actionTextPT}成功",
"xpack.ml.jobsList.actionFailedNotificationMessage": "{failureId} が {actionText} に失敗しました",
"xpack.ml.jobsList.actionsLabel": "アクション",
"xpack.ml.jobsList.cannotSelectJobTooltip": "ジョブを選択できません",
"xpack.ml.jobsList.cloneJobErrorMessage": "{jobId} のクローンを作成できませんでした。ジョブが見つかりませんでした",
"xpack.ml.jobsList.closeActionStatusText": "閉じる",
"xpack.ml.jobsList.closedActionStatusText": "クローズ済み",
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/translations/translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -6647,7 +6647,6 @@
"xpack.ml.jobsList.actionExecuteSuccessfullyNotificationMessage": "{successesJobsCount, plural, one{{successJob}} other{# 个作业}}{actionTextPT}已成功",
"xpack.ml.jobsList.actionFailedNotificationMessage": "{failureId} 未能{actionText}",
"xpack.ml.jobsList.actionsLabel": "操作",
"xpack.ml.jobsList.cannotSelectJobTooltip": "无法选择作业",
"xpack.ml.jobsList.cloneJobErrorMessage": "无法克隆 {jobId}。找不到作业",
"xpack.ml.jobsList.closeActionStatusText": "关闭",
"xpack.ml.jobsList.closedActionStatusText": "已关闭",
Expand Down