Skip to content

Commit 7e5089a

Browse files
committed
fix: update aria labels for consistency and improved accessibility in modal components
1 parent 50a3479 commit 7e5089a

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

Diff for: docs/embedding.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -431,13 +431,13 @@ The following table defines the default aria labels used throughout the Webchat
431431
| Name | Type | Default | Description |
432432
| ------------------------- | ------ | ---------------------------- | ----------------------------------------------------------------------------------- |
433433
| scrollToBottom | string | "Scroll to bottom" | Label for the button that scrolls the chat view to the bottom. |
434-
| close | string | "Close" | Label for close buttons in modals or dialogs. |
434+
| closeDialog | string | "Close Dialog" | Label for close buttons in modals or dialogs. |
435435
| togglePersistentMenu | string | "Toggle menu" | Label for the button toggling the persistent menu. |
436436
| addAttachment | string | "Add attachment" | Label for the button that allows uploading attachments. |
437-
| messageToSend | string | "Type your message" | Label for the message input field. |
438-
| speechToText | string | "Activate speech-to-text" | Label for the speech-to-text control button. |
439-
| sendMessage | string | "Send message" | Label for the send message button. |
440-
| removeFileAttachment | string | "Remove attachment" | Label for the button to remove a file attachment. |
437+
| messageToSend | string | "Message to send" | Label for the message input field. |
438+
| speechToText | string | "Speech to text" | Label for the speech-to-text control button. |
439+
| sendMessage | string | "Send Message" | Label for the send message button. |
440+
| removeFileAttachment | string | "Remove File Attachment" | Label for the button to remove a file attachment. |
441441
| closeWarning | string | "Close warning" | Label for closing warning dialogs. |
442442
| goBack | string | "Go back" | Label for buttons allowing the user to go back. |
443443
| deleteAllConversations | string | "Delete all conversations" | Label for the button to delete all conversations. |
@@ -668,7 +668,7 @@ interface IWebchatSettings {
668668
cancel?: string;
669669
ariaLabels?: {
670670
scrollToBottom?: string;
671-
close?: string;
671+
closeDialog?: string;
672672
togglePersistentMenu?: string;
673673
addAttachment?: string;
674674
messageToSend?: string;

Diff for: src/common/interfaces/webchat-config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ export interface IWebchatSettings {
316316
cancel: string;
317317
ariaLabels?: {
318318
scrollToBottom?: string;
319-
close?: string;
319+
closeDialog?: string;
320320
togglePersistentMenu?: string;
321321
addAttachment?: string;
322322
messageToSend?: string;

Diff for: src/webchat-ui/components/Modal/Modal.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ const Modal: React.FC<ModalProps> = ({ isOpen, onClose, title, footer, children,
170170
{title}
171171
</Typography>
172172
<CloseButton
173-
aria-label={ariaLabels?.close ?? "Close"}
173+
aria-label={ariaLabels?.close ?? "Close Dialog"}
174174
onClick={handleOnClose}
175175
className="webchat-modal-close-button"
176176
>

Diff for: src/webchat-ui/components/presentational/chat-options/DeleteConversation.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ const DeleteConversation = (props: DeleteConversationProps) => {
9898
cancelButtonBackground={config.settings.customColors?.cancelButtonColor}
9999
confirmButtonBackground={config.settings.customColors?.deleteButtonColor}
100100
ariaLabels={{
101-
close: config.settings.customTranslations?.ariaLabels?.close,
101+
close: config.settings.customTranslations?.ariaLabels?.closeDialog,
102102
}}
103103
>
104104
<Typography variant="body-regular" className="webchat-delete-conversation-text">

Diff for: src/webchat-ui/components/presentational/previous-conversations/DeleteAllConversations.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ const DeleteAllConversationsModal = (
5959
cancelButtonBackground={config.settings.customColors?.cancelButtonColor}
6060
confirmButtonBackground={config.settings.customColors?.deleteButtonColor}
6161
ariaLabels={{
62-
close: config.settings.customTranslations?.ariaLabels?.close,
62+
close: config.settings.customTranslations?.ariaLabels?.closeDialog,
6363
}}
6464
>
6565
<Typography variant="body-regular" className="webchat-delete-all-conversation-text">

0 commit comments

Comments
 (0)