From ba9de63075349b9791f1b1fbf7d4f5d6c06fb72b Mon Sep 17 00:00:00 2001 From: Mathieu Suen Date: Mon, 29 Aug 2022 11:29:09 +0200 Subject: [PATCH] SONAR-16829 Accessible name not same order as visible label --- .../main/js/components/controls/Checkbox.tsx | 15 ++++++++++++++- .../main/js/components/issue/IssueView.tsx | 19 ++++++++++--------- .../resources/org/sonar/l10n/core.properties | 1 + 3 files changed, 25 insertions(+), 10 deletions(-) diff --git a/server/sonar-web/src/main/js/components/controls/Checkbox.tsx b/server/sonar-web/src/main/js/components/controls/Checkbox.tsx index e1a9af7ba58..69fb1518e03 100644 --- a/server/sonar-web/src/main/js/components/controls/Checkbox.tsx +++ b/server/sonar-web/src/main/js/components/controls/Checkbox.tsx @@ -31,6 +31,7 @@ interface Props { children?: React.ReactNode; className?: string; id?: string; + label?: string; loading?: boolean; onCheck: (checked: boolean, id?: string) => void; right?: boolean; @@ -52,7 +53,17 @@ export default class Checkbox extends React.PureComponent { }; render() { - const { checked, children, disabled, id, loading, right, thirdState, title } = this.props; + const { + checked, + children, + disabled, + id, + label, + loading, + right, + thirdState, + title + } = this.props; const className = classNames('icon-checkbox', { 'icon-checkbox-checked': checked, 'icon-checkbox-single': thirdState, @@ -63,6 +74,7 @@ export default class Checkbox extends React.PureComponent { return ( { return ( { onClick={this.handleClick} role="region" aria-label={issue.message}> + {hasCheckbox && ( + + )} { ))} )} - {hasCheckbox && ( - - )} ); } diff --git a/sonar-core/src/main/resources/org/sonar/l10n/core.properties b/sonar-core/src/main/resources/org/sonar/l10n/core.properties index cc279036b39..304b0f418e8 100644 --- a/sonar-core/src/main/resources/org/sonar/l10n/core.properties +++ b/sonar-core/src/main/resources/org/sonar/l10n/core.properties @@ -868,6 +868,7 @@ issue.transition.resetastoreview.description=The Security Hotspot should be anal issue.tabs.code=Where is the issue? issues.action_select=Select issue +issues.action_select.label=Select issue {0} issue.set_severity=Change Severity issue.set_type=Change Type -- 2.39.5