[MM-61633]: Add aria-label in the on-boarding button (#29812)
* MM-61633: Add aria-label in the onboarding button * MM-61633: Update formatting * MM-61633: Add strings for localization --------- Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
4225b9bac1
Коммит
12fea07714
@@ -2,7 +2,7 @@
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
import React, {useRef, useCallback, useEffect, useState} from 'react';
|
||||
import {FormattedMessage} from 'react-intl';
|
||||
import {FormattedMessage, useIntl} from 'react-intl';
|
||||
import {useDispatch, useSelector} from 'react-redux';
|
||||
import styled, {css} from 'styled-components';
|
||||
|
||||
@@ -126,6 +126,7 @@ const Button = styled.button<{open: boolean}>(({open}) => {
|
||||
});
|
||||
|
||||
const OnBoardingTaskList = (): JSX.Element | null => {
|
||||
const {formatMessage} = useIntl();
|
||||
const hasPreferences = useSelector((state: GlobalState) => Object.keys(getMyPreferencesSelector(state)).length !== 0);
|
||||
|
||||
useEffect(() => {
|
||||
@@ -255,6 +256,7 @@ const OnBoardingTaskList = (): JSX.Element | null => {
|
||||
ref={trigger}
|
||||
open={open}
|
||||
data-cy='onboarding-task-list-action-button'
|
||||
aria-label={formatMessage({id: 'onboardingTask.checklist.start_onboarding_process', defaultMessage: 'Start the onboarding process.'})}
|
||||
>
|
||||
{open ? <CloseIcon size={20}/> : <PlaylistCheckIcon size={20}/>}
|
||||
{itemsLeft !== 0 && (<span>{itemsLeft}</span>)}
|
||||
|
||||
@@ -4570,6 +4570,7 @@
|
||||
"onboardingTask.checklist.main_subtitle": "Let's get up and running.",
|
||||
"onboardingTask.checklist.no_thanks": "No, thanks",
|
||||
"onboardingTask.checklist.start_enterprise_now": "Start your free Enterprise trial now!",
|
||||
"onboardingTask.checklist.start_onboarding_process": "Start the onboarding process.",
|
||||
"onboardingTask.checklist.task_complete_your_profile": "Complete your profile.",
|
||||
"onboardingTask.checklist.task_download_mm_apps": "Download the Desktop and Mobile Apps.",
|
||||
"onboardingTask.checklist.task_invite_team_members": "Invite team members to the workspace.",
|
||||
|
||||
Ссылка в новой задаче
Block a user