]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-22418 Fix radio buttons labels
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>
Fri, 28 Jun 2024 07:08:30 +0000 (09:08 +0200)
committersonartech <sonartech@sonarsource.com>
Wed, 10 Jul 2024 20:02:39 +0000 (20:02 +0000)
server/sonar-web/src/main/js/apps/audit-logs/components/AuditAppRenderer.tsx
server/sonar-web/src/main/js/apps/issues/components/BulkChangeModal.tsx
server/sonar-web/src/main/js/apps/projectsManagement/ChangeDefaultVisibilityForm.tsx
server/sonar-web/src/main/js/apps/quality-gates/components/AddConditionModal.tsx
server/sonar-web/src/main/js/apps/system/components/ChangeLogLevelForm.tsx
server/sonar-web/src/main/js/components/common/VisibilitySelector.tsx
sonar-core/src/main/resources/org/sonar/l10n/core.properties

index 9c5db272fc335a1a009c783e4cb8d9269b353b3b..5b3da2702dca34c266fb115bc5cdbe0647722b37 100644 (file)
@@ -107,9 +107,12 @@ export default function AuditAppRenderer(props: Readonly<AuditAppRendererProps>)
         </p>
 
         <div className="sw-mb-6">
-          <h3 className="sw-mb-4">{translate('audit_logs.download')}</h3>
+          <h3 className="sw-mb-4" id="audit-logs-housekeeping-radio-label">
+            {translate('audit_logs.download')}
+          </h3>
 
           <RadioButtonGroup
+            ariaLabelledBy="audit-logs-housekeeping-radio-label"
             id="audit-logs-housekeeping-radio"
             options={getRangeOptions(housekeepingPolicy).map((option) => ({
               label: translate('audit_logs.range_option', option),
index 7ef0a24d307142a708f79cf1d8a2bffdf9d6539e..3884dd476ecf840d20a28ef6f536b92ecb8146f2 100644 (file)
@@ -309,12 +309,12 @@ export class BulkChangeModal extends React.PureComponent<Props, State> {
     return (
       <div className="sw-mb-6">
         <fieldset>
-          <Highlight as="legend" className="sw-mb-2">
+          <Highlight id="bulk-change-transition-label" as="legend" className="sw-mb-2">
             {translate('issue.change_status')}
           </Highlight>
 
           <RadioButtonGroup
-            ariaLabel="a"
+            ariaLabelledBy="bulk-change-transition-label"
             id="bulk-change-transition"
             options={transitions.map(({ transition, count }) => ({
               label: translate('issue.transition', transition),
index 5a37ed41b9474a2624f62816e590bf4a746ab877..5b4005e91717d1ad98d07d1b79461a9eaee4cf16 100644 (file)
@@ -51,6 +51,7 @@ export default function ChangeDefaultVisibilityForm(props: Readonly<Props>) {
   const body = (
     <form id={FORM_ID} onSubmit={handleConfirmClick}>
       <RadioButtonGroup
+        ariaLabel={header}
         id="settings-projects-visibility-radio"
         options={Object.values(Visibility).map((visibilityValue) => ({
           label: translate('visibility', visibilityValue),
index d17cb066a2afdd5933d916e34e683cad61c78048..2000c46713f8e062f8577472b10e971e61b27f1a 100644 (file)
@@ -94,7 +94,10 @@ export default function AddConditionModal({ metrics, onClose, qualityGate }: Rea
   const renderBody = () => {
     return (
       <form onSubmit={handleFormSubmit} id={ADD_CONDITION_MODAL_ID}>
-        <FormField label={translate('quality_gates.conditions.where')}>
+        <FormField
+          label={translate('quality_gates.conditions.where')}
+          htmlFor="quality_gates-add-condition-scope-radio"
+        >
           <RadioButtonGroup
             id="quality_gates-add-condition-scope-radio"
             options={[
index 87e64ff1beda26ff82b7240f2c2d333b81b3122d..a7593bf8391b36c7d160805af48f5cfd52864537 100644 (file)
@@ -68,6 +68,7 @@ export default class ChangeLogLevelForm extends React.PureComponent<Props, State
           <form id={FORM_ID} onSubmit={this.handleFormSubmit}>
             <div className="sw-mt-1">
               <RadioButtonGroup
+                ariaLabel={header}
                 id="system-loglevel-radio"
                 options={LOGS_LEVELS.map((level) => ({ label: level, value: level }))}
                 value={newLevel}
index ab68ccc44c1fb0bb7f04207af1abee4d6434edb1..9af36c10bb943aff14e8d0fdf6d1e8c7c68353c9 100644 (file)
@@ -37,6 +37,7 @@ export default function VisibilitySelector(props: Readonly<VisibilitySelectorPro
   return (
     <div className={classNames(className)}>
       <RadioButtonGroup
+        ariaLabel={translate('roles.page.change_visibility')}
         id="project-visiblity-radio"
         isDisabled={disabled}
         options={Object.values(Visibility).map((v) => ({
index 6145e9dd6b040766d5c1a25790304c839f88aadf..6a1fe903a18cc04dbe2d7b4d55c68182d05bd85a 100644 (file)
@@ -628,6 +628,7 @@ roles.page.description2=Grant and revoke project-level permissions. Permissions
 roles.page.description_portfolio=Grant and revoke portfolio-level permissions. Permissions can be granted to groups or individual users.
 roles.page.description_application=Grant and revoke application-level permissions. Permissions can be granted to groups or individual users.
 roles.page.description.github=Project permissions are read-only for users provisioned from GitHub. For non-GitHub users, permissions can only be removed.
+roles.page.change_visibility=Change project visibility
 project_permission.github_managed=Provisioned from GitHub
 project_permission.local_project_with_github_provisioning=Please note that this project is not linked to GitHub. Bind it to GitHub to benefit from permission provisioning.
 project_permission.remove_only_confirmation=Are you sure you want to remove the permission {permission} from {holder}? The permission can not be added back.
@@ -726,7 +727,7 @@ regulatory_report.description2=The generation and download of the report may tak
 regulatory_page.download_start.sentence=Your download should start shortly. This may take some time.
 regulatory_page.select_branch=Select Branch
 regulatory_page.no_available_branch=No branch has been analyzed yet, no report can be generated.
-regulatory_page.available_branches_info.only_keep_when_inactive=Only branches marked as "Keep when inactive" are available. 
+regulatory_page.available_branches_info.only_keep_when_inactive=Only branches marked as "Keep when inactive" are available.
 regulatory_page.available_branches_info.more_info=For further details, please check the {doc_link}.
 regulatory_page.available_branches_info.more_info.doc_link=related documentation
 
@@ -833,7 +834,7 @@ hotspots.tabs.activity=Activity
 hotspots.tabs.code.short=Where
 hotspots.tabs.risk_description.short=What
 hotspots.tabs.vulnerability_description.short=Assess
-hotspots.tabs.fix_recommendations.short=How 
+hotspots.tabs.fix_recommendations.short=How
 hotspots.tabs.activity.short=Activity
 hotspots.review_history.created=created Security Hotspot
 hotspots.review_history.comment_added=added a comment
@@ -950,7 +951,7 @@ issue.transition.unconfirm=Open
 issue.transition.unconfirm.description=Reopen issue
 issue.transition.resolve=Fixed
 issue.transition.resolve.description=Deprecated
-issue.transition.resolve.deprecated_tooltip.1=The Resolve as Fixed action is deprecated. 
+issue.transition.resolve.deprecated_tooltip.1=The Resolve as Fixed action is deprecated.
 issue.transition.resolve.deprecated_tooltip.2=The next analysis result will show if the issue has been fixed, otherwise it will reopen it automatically.
 issue.transition.resolve.deprecated_tooltip.3=If you were using Resolve as Fixed to communicate with team members that an issue is being fixed, consider assigning it or using comments and tags instead.
 issue.transition.falsepositive=False Positive
@@ -1209,7 +1210,7 @@ issues.facet.createdAt.bar_description={0} issues from {1} to {2}
 issues.facet.authors=Author
 issues.facet.impactSeverities=Severity
 issues.facet.impactSeverities.help.line1=Severities are now directly tied to the software quality impacted. This means that one software quality impacted has one severity.
-issues.facet.impactSeverities.help.line2=There are only three levels: high, medium, and low. 
+issues.facet.impactSeverities.help.line2=There are only three levels: high, medium, and low.
 issues.facet.issues=Issue Key
 issues.facet.mode=Display Mode
 issues.facet.mode.count=Issues
@@ -1690,7 +1691,7 @@ settings.authentication.saml.form.provisioning_with_scim=Automatic user and grou
 settings.authentication.saml.form.provisioning_with_scim.sub=Preferred option when using a supported identity provider.
 settings.authentication.saml.form.provisioning_with_scim.description=Users and groups are automatically provisioned from your identity provider using the SCIM protocol. Once activated, managed users and groups can only be modified from your identity provider. Existing local users and groups will be kept.
 settings.authentication.saml.form.provisioning_with_scim.description.doc=For a list of supported providers and more details on automatic provisioning, see {documentation}.
-settings.authentication.saml.form.provisioning.disabled=Your current edition does not support provisioning with SCIM. See the {documentation} for more information. 
+settings.authentication.saml.form.provisioning.disabled=Your current edition does not support provisioning with SCIM. See the {documentation} for more information.
 settings.authentication.saml.enable_first=Enable your SAML configuration to benefit from automatic user provisioning options.
 
 settings.pr_decoration.binding.category=DevOps Platform Integration
@@ -2064,7 +2065,7 @@ projects_management.delete_selected_warning=You're about to delete {0} selected
 projects_management.delete_all_warning=You're about to delete all {0} items.
 projects_management.project_has_been_successfully_created=Project {project} has been successfully created.
 projects_management.select_project=Select project {0}
-projects_management.show_actions_for_x=Show actions for project {0} 
+projects_management.show_actions_for_x=Show actions for project {0}
 projects_management.filter_by_component=Filter by component
 projects_management.filter_by_visibility=Filter by visibility
 
@@ -2079,8 +2080,8 @@ application.info.title=Application Information
 project.about.title=About this Project
 application.about.title=About this Application
 project.info.description=Description
-project.info.empty_description=No description added for this project. 
-application.info.empty_description=No description added for this application. 
+project.info.empty_description=No description added for this project.
+application.info.empty_description=No description added for this application.
 project.info.quality_gate=Quality Gate used
 project.info.to_notifications=Set notifications
 project.info.notifications=Notifications
@@ -3469,7 +3470,7 @@ permission_templates.bulk_apply_permission_template.apply_to_github_projects=You
 permission_templates.bulk_apply_permission_template.apply_to_only_github_projects=You can't apply permission templates to GitHub projects.
 permission_templates.select_to_delete=You must select at least one item
 permission_templates.delete_selected=Delete all selected items
-permission_templates.show_actions_for_x=Show actions for template {0} 
+permission_templates.show_actions_for_x=Show actions for template {0}
 
 
 #------------------------------------------------------------------------------
@@ -3958,7 +3959,7 @@ overview.quality_gate.duplications=Duplications
 overview.new_coverage.on_x_new_lines=On {link} New Lines to cover.
 overview.coverage.on_x_new_lines=On {link} lines to cover.
 overview.new_duplicated_lines_density.on_x_new_lines=On {link} New Lines.
-overview.duplicated_lines_density.on_x_new_lines=On {link} lines. 
+overview.duplicated_lines_density.on_x_new_lines=On {link} lines.
 overview.quality_gate.require_fixing={count, plural, one {requires} other {require}} fixing
 overview.quality_gate.require_reviewing={count, plural, one {requires} other {require}} reviewing
 overview.quality_gate.required_x=Required {operator} {requirement}
@@ -4181,7 +4182,7 @@ api_documentation.v2.request_subheader.query=Query Parameters
 api_documentation.v2.request_subheader.path=Path Parameters
 api_documentation.v2.request_subheader.header=Headers
 api_documentation.v2.request_subheader.request_body=Request Body
-api_documentation.v2.request_subheader.request_content_type=Content-Type: 
+api_documentation.v2.request_subheader.request_content_type=Content-Type:
 api_documentation.v2.enum_description=Valid values: {values}
 
 
@@ -5196,7 +5197,7 @@ encryption.how_to_use.content4=For each property that you want to encrypt, gener
 #------------------------------------------------------------------------------
 users.page=Users
 users.page.description=Create and administer individual users.
-users.page.managed_description=Your instance is managed by {provider}. No modification is allowed except for tokens and SCM account information. You can still delete local users. All other operations should be done on your identity provider. See {link} for help managing users. 
+users.page.managed_description=Your instance is managed by {provider}. No modification is allowed except for tokens and SCM account information. You can still delete local users. All other operations should be done on your identity provider. See {link} for help managing users.
 users.info=User
 users.deactivate=Deactivate
 users.deactivate_user=Deactivate User
@@ -5284,7 +5285,7 @@ users.filter.by=Filter by
 user_groups.page=Groups
 user_groups.page.description=Create and administer groups of users.
 user_groups.page.group_header=Name
-user_groups.page.managed_description=Your instance is managed by {provider}. No modification is allowed. You can still delete local groups. All other operations should be done on your identity provider. See {link} for help managing groups. 
+user_groups.page.managed_description=Your instance is managed by {provider}. No modification is allowed. You can still delete local groups. All other operations should be done on your identity provider. See {link} for help managing groups.
 user_groups.anyone.description=Anybody who browses the application belongs to this group. If authentication is not enforced, assigned permissions also apply to non-authenticated users.
 groups.delete_group=Delete Group
 groups.delete_group.confirmation=Are you sure you want to delete "{0}"?