From abeef6176740de9beb2e140d5aee189ae3115e6f Mon Sep 17 00:00:00 2001 From: Hugo Costa Date: Fri, 15 Dec 2023 14:02:52 -0300 Subject: [PATCH] chore: add aria-label to Select Inputs at Engagement Dashboard --- .../ee/client/components/dashboards/PeriodSelector.tsx | 10 +++++++++- .../engagementDashboard/EngagementDashboardPage.tsx | 7 ++++++- .../users/BusiestChatTimesSection.tsx | 7 ++++++- apps/meteor/packages/rocketchat-i18n/i18n/en.i18n.json | 3 ++- 4 files changed, 23 insertions(+), 4 deletions(-) diff --git a/apps/meteor/ee/client/components/dashboards/PeriodSelector.tsx b/apps/meteor/ee/client/components/dashboards/PeriodSelector.tsx index 7d84a4df62d25..6977e3334f4fb 100644 --- a/apps/meteor/ee/client/components/dashboards/PeriodSelector.tsx +++ b/apps/meteor/ee/client/components/dashboards/PeriodSelector.tsx @@ -18,7 +18,15 @@ const PeriodSelector = ({ periods, value, name, o const options = useMemo<[string, string][]>(() => periods.map((period) => [period, t(...getPeriod(period).label)]), [periods, t]); - return onChange(value as TPeriod)} + aria-label={t('Select_period')} + /> + ); }; export default PeriodSelector; diff --git a/apps/meteor/ee/client/views/admin/engagementDashboard/EngagementDashboardPage.tsx b/apps/meteor/ee/client/views/admin/engagementDashboard/EngagementDashboardPage.tsx index 711798dc49072..de40e04dcfcac 100644 --- a/apps/meteor/ee/client/views/admin/engagementDashboard/EngagementDashboardPage.tsx +++ b/apps/meteor/ee/client/views/admin/engagementDashboard/EngagementDashboardPage.tsx @@ -35,7 +35,12 @@ const EngagementDashboardPage = ({ tab = 'users', onSelectTab }: EngagementDashb return ( - handleTimezoneChange(String(value))} + aria-label={t('Default_Timezone_For_Reporting')} + /> diff --git a/apps/meteor/ee/client/views/admin/engagementDashboard/users/BusiestChatTimesSection.tsx b/apps/meteor/ee/client/views/admin/engagementDashboard/users/BusiestChatTimesSection.tsx index de8ebee6dfe3d..f70acde3a8e42 100644 --- a/apps/meteor/ee/client/views/admin/engagementDashboard/users/BusiestChatTimesSection.tsx +++ b/apps/meteor/ee/client/views/admin/engagementDashboard/users/BusiestChatTimesSection.tsx @@ -45,7 +45,12 @@ const BusiestChatTimesSection = ({ timezone }: BusiestChatTimesSectionProps): Re return ( <> - handleTimeUnitChange(String(value))} + aria-label={t('Select_period')} + />