Skip to content

Commit

Permalink
feat: a11y doc links (#31473)
Browse files Browse the repository at this point in the history
  • Loading branch information
juliajforesti authored Jan 31, 2024
1 parent 0ff92dc commit 9c6052e
Show file tree
Hide file tree
Showing 18 changed files with 43 additions and 16 deletions.
5 changes: 5 additions & 0 deletions .changeset/kind-dragons-flash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rocket.chat/meteor': minor
---

feat: add a11y doc links
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
ToggleSwitch,
} from '@rocket.chat/fuselage';
import { useUniqueId } from '@rocket.chat/fuselage-hooks';
import { ExternalLink } from '@rocket.chat/ui-client';
import { useTranslation, useToastMessageDispatch, useEndpoint, useSetting } from '@rocket.chat/ui-contexts';
import { useMutation } from '@tanstack/react-query';
import React, { useMemo } from 'react';
Expand Down Expand Up @@ -52,6 +53,7 @@ const AccessibilityPage = () => {
const clockModeId = useUniqueId();
const hideUsernamesId = useUniqueId();
const hideRolesId = useUniqueId();
const linkListId = useUniqueId();

const {
formState: { isDirty, dirtyFields, isSubmitting },
Expand Down Expand Up @@ -88,7 +90,23 @@ const AccessibilityPage = () => {
<PageScrollableContentWithShadow>
<Box is='form' id={pageFormId} onSubmit={handleSubmit(handleSaveData)} maxWidth='x600' w='full' alignSelf='center' mb={40} mi={36}>
<Box fontScale='p1' mbe={24}>
<Box pb={16}>{t('Accessibility_activation')}</Box>
<Box pb={16} is='p'>
{t('Accessibility_activation')}
</Box>
<p id={linkListId}>{t('Learn_more_about_accessibility')}</p>
<ul aria-labelledby={linkListId}>
<li>
<ExternalLink to='https://go.rocket.chat/i/accessibility-statement'>{t('Accessibility_statement')}</ExternalLink>
</li>
<li>
<ExternalLink to='https://go.rocket.chat/i/glossary'>{t('Glossary_of_simplified_terms')}</ExternalLink>
</li>
<li>
<ExternalLink to='https://go.rocket.chat/i/accessibility-and-appearance'>
{t('Accessibility_feature_documentation')}
</ExternalLink>
</li>
</ul>
</Box>
<Accordion>
<Accordion.Item defaultExpanded={true} title={t('Theme')}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ const AgentsTable = () => {
icon='headset'
title={t('No_agents_yet')}
description={t('No_agents_yet_description')}
linkHref='https://go.rocket.chat/omnichannel-docs'
linkHref='https://go.rocket.chat/i/omnichannel-docs'
linkText={t('Learn_more_about_agents')}
/>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const BusinessHoursDisabledPage = () => {
<StatesAction onClick={() => router.navigate('/admin/settings/Omnichannel')}>{t('Enable_business_hours')}</StatesAction>
</StatesActions>
)}
<StatesLink target='_blank' href='https://go.rocket.chat/omnichannel-docs'>
<StatesLink target='_blank' href='https://go.rocket.chat/i/omnichannel-docs'>
{t('Learn_more_about_business_hours')}
</StatesLink>
</States>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ const CurrentChatsPage = ({ id, onRowClick }: { id?: string; onRowClick: (_id: s
icon='discussion'
title={t('No_chats_yet')}
description={t('No_chats_yet_description')}
linkHref='https://go.rocket.chat/omnichannel-docs'
linkHref='https://go.rocket.chat/i/omnichannel-docs'
linkText={t('Learn_more_about_current_chats')}
/>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ const CustomFieldsTable = () => {
description={t('No_custom_fields_yet_description')}
buttonAction={handleAddNew}
buttonTitle={t('Create_custom_field')}
linkHref='https://go.rocket.chat/omnichannel-docs'
linkHref='https://go.rocket.chat/i/omnichannel-docs'
linkText={t('Learn_more_about_custom_fields')}
/>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ const DepartmentsTable = ({ archived }: { archived: boolean }) => {
description={t('No_departments_yet_description')}
buttonAction={handleAddNew}
buttonTitle={t('Create_department')}
linkHref='https://go.rocket.chat/omnichannel-docs'
linkHref='https://go.rocket.chat/i/omnichannel-docs'
linkText={t('Learn_more_about_departments')}
/>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ const CallTable = () => {
icon='phone'
title={t('No_calls_yet')}
description={t('No_calls_yet_description')}
linkHref='https://go.rocket.chat/omnichannel-docs'
linkHref='https://go.rocket.chat/i/omnichannel-docs'
linkText={t('Learn_more_about_voice_channel')}
/>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ const ChatTable = () => {
icon='message'
title={t('No_chats_yet')}
description={t('No_chats_yet_description')}
linkHref='https://go.rocket.chat/omnichannel-docs'
linkHref='https://go.rocket.chat/i/omnichannel-docs'
linkText={t('Learn_more_about_conversations')}
/>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ function ContactTable(): ReactElement {
description={t('No_contacts_yet_description')}
buttonTitle={t('New_contact')}
buttonAction={onButtonNewClick}
linkHref='https://go.rocket.chat/omnichannel-docs'
linkHref='https://go.rocket.chat/i/omnichannel-docs'
linkText={t('Learn_more_about_contacts')}
/>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const ManagersTable = () => {
icon='shield'
title={t('No_managers_yet')}
description={t('No_managers_yet_description')}
linkHref='https://go.rocket.chat/omnichannel-docs'
linkHref='https://go.rocket.chat/i/omnichannel-docs'
linkText={t('Learn_more_about_managers')}
/>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const TriggersTable = () => {
description={t('No_triggers_yet_description')}
buttonAction={handleAddNew}
buttonTitle={t('Create_trigger')}
linkHref='https://go.rocket.chat/omnichannel-docs'
linkHref='https://go.rocket.chat/i/omnichannel-docs'
linkText={t('Learn_more_about_triggers')}
/>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ const CannedResponsesTable = () => {
description={t('No_Canned_Responses_Yet-description')}
buttonTitle={t('Create_canned_response')}
buttonAction={handleAddNew}
linkHref='https://go.rocket.chat/omnichannel-docs'
linkHref='https://go.rocket.chat/i/omnichannel-docs'
linkText={t('Learn_more_about_canned_responses')}
/>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ const MonitorsTable = () => {
icon='shield-blank'
title={t('No_monitors_yet')}
description={t('No_monitors_yet_description')}
linkHref='https://go.rocket.chat/omnichannel-docs'
linkHref='https://go.rocket.chat/i/omnichannel-docs'
linkText={t('Learn_more_about_monitors')}
/>
)}
Expand Down
2 changes: 1 addition & 1 deletion apps/meteor/ee/client/omnichannel/slaPolicies/SlaTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ const SlaTable = ({ reload }: { reload: MutableRefObject<() => void> }) => {
description={t('No_SLA_policies_yet_description')}
buttonTitle={t('Create_SLA_policy')}
buttonAction={handleAddNew}
linkHref='https://go.rocket.chat/omnichannel-docs'
linkHref='https://go.rocket.chat/i/omnichannel-docs'
linkText={t('Learn_more_about_SLA_policies')}
/>
)}
Expand Down
2 changes: 1 addition & 1 deletion apps/meteor/ee/client/omnichannel/tags/TagsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ const TagsTable = () => {
description={t('No_tags_yet_description')}
buttonTitle={t('Create_tag')}
buttonAction={handleAddNew}
linkHref='https://go.rocket.chat/omnichannel-docs'
linkHref='https://go.rocket.chat/i/omnichannel-docs'
linkText={t('Learn_more_about_tags')}
/>
)}
Expand Down
2 changes: 1 addition & 1 deletion apps/meteor/ee/client/omnichannel/units/UnitsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const UnitsTable = () => {
icon='business'
title={t('No_units_yet')}
description={t('No_units_yet_description')}
linkHref='https://go.rocket.chat/omnichannel-docs'
linkHref='https://go.rocket.chat/i/omnichannel-docs'
buttonAction={handleAddNew}
buttonTitle={t('Create_unit')}
linkText={t('Learn_more_about_units')}
Expand Down
4 changes: 4 additions & 0 deletions apps/meteor/packages/rocketchat-i18n/i18n/en.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
"Accessibility": "Accessibility",
"Accessibility_and_Appearance": "Accessibility & appearance",
"Accessibility_activation": "Here you can activate a range of features to enhance your browsing experience.",
"Accessibility_statement": "Accessibility statement",
"Accessibility_feature_documentation": "Accessibility feature documentation",
"Accept_Call": "Accept Call",
"Accept": "Accept",
"Accept_incoming_livechat_requests_even_if_there_are_no_online_agents": "Accept incoming omnichannel requests even if there are no online agents",
Expand Down Expand Up @@ -2453,6 +2455,7 @@
"Global Policy": "Global Policy",
"Global_purge_override_warning": "A global retention policy is in place. If you leave \"Override global retention policy\" off, you can only apply a policy that is stricter than the global policy.",
"Global_Search": "Global search",
"Glossary_of_simplified_terms": "Glossary of simplified terms",
"Go_to_your_workspace": "Go to your workspace",
"Go_to_accessibility_and_appearance": "Go to accessibility and appearance",
"Google_Meet_Premium_only": "Google Meet (Premium only)",
Expand Down Expand Up @@ -3061,6 +3064,7 @@
"Lead_capture_phone_regex": "Lead capture phone regex",
"Learn_more": "Learn more",
"Learn_more_about_agents": "Learn more about agents",
"Learn_more_about_accessibility": "Learn more about our commitment with accessibility here:",
"Learn_more_about_business_hours": "Learn more about business hours",
"Learn_more_about_canned_responses": "Learn more about canned responses",
"Learn_more_about_contacts": "Learn more about contacts",
Expand Down

0 comments on commit 9c6052e

Please sign in to comment.