From b1a18b24777afe4b3684571d88d0ca35d3afcdec Mon Sep 17 00:00:00 2001 From: Cyril Date: Wed, 3 Dec 2025 13:30:00 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8(frontend)=20add=20missing=20label=20t?= =?UTF-8?q?o=20improve=20a11y=20and=20pass=20axe=20checks?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit enhances a11y by adding label to fix axe tool errors on missing attributes Signed-off-by: Cyril --- CHANGELOG.md | 5 +++-- .../docs/doc-editor/components/BlockNoteEditor.tsx | 2 -- .../docs/doc-management/components/DocIcon.tsx | 12 ++++++++++++ .../docs/doc-share/components/DocShareModal.tsx | 1 - 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d07f6750..10eca5f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,9 +14,10 @@ and this project adheres to - 🔒(helm) Set default security context #1750 - ✨(backend) use langfuse to monitor AI actions -### Fixed +### Fixed - ✅(backend) reduce flakiness on backend test #1769 +- 🐛(frontend) fix clickable main content regression #1773 - 🐛(backend) fix TRASHBIN_CUTOFF_DAYS type error #1778 ### Security @@ -27,6 +28,7 @@ and this project adheres to - ♿(frontend) improve accessibility: - ♿(frontend) make html export accessible to screen reader users #1743 + - ♿(frontend) add missing label and fix Axes errors to improve a11y #1693 ## [4.3.0] - 2026-01-05 @@ -46,7 +48,6 @@ and this project adheres to - 🐛(frontend) fix tables deletion #1739 - 🐛(frontend) fix children not display when first resize #1753 -- 🐛(frontend) fix clickable main content regression #1773 ## [4.2.0] - 2025-12-17 diff --git a/src/frontend/apps/impress/src/features/docs/doc-editor/components/BlockNoteEditor.tsx b/src/frontend/apps/impress/src/features/docs/doc-editor/components/BlockNoteEditor.tsx index 7402d634..3b6b8b75 100644 --- a/src/frontend/apps/impress/src/features/docs/doc-editor/components/BlockNoteEditor.tsx +++ b/src/frontend/apps/impress/src/features/docs/doc-editor/components/BlockNoteEditor.tsx @@ -259,7 +259,6 @@ export const BlockNoteReader = ({ const { user } = useAuth(); const { setEditor } = useEditorStore(); const { threadStore } = useComments(docId, false, user); - const { t } = useTranslation(); const editor = useCreateBlockNote( { collaboration: { @@ -305,7 +304,6 @@ export const BlockNoteReader = ({ editor={editor} editable={false} theme="light" - aria-label={t('Document viewer')} formattingToolbar={false} slashMenu={false} comments={false} diff --git a/src/frontend/apps/impress/src/features/docs/doc-management/components/DocIcon.tsx b/src/frontend/apps/impress/src/features/docs/doc-management/components/DocIcon.tsx index 2218bb6e..208969d6 100644 --- a/src/frontend/apps/impress/src/features/docs/doc-management/components/DocIcon.tsx +++ b/src/frontend/apps/impress/src/features/docs/doc-management/components/DocIcon.tsx @@ -1,5 +1,6 @@ import { MouseEvent, useRef, useState } from 'react'; import { createPortal } from 'react-dom'; +import { useTranslation } from 'react-i18next'; import { BoxButton, BoxButtonType, Text, TextType } from '@/components'; import { EmojiPicker, emojidata } from '@/docs/doc-editor/'; @@ -30,6 +31,7 @@ export const DocIcon = ({ ...textProps }: DocIconProps) => { const { updateDocEmoji } = useDocTitleUpdate(); + const { t } = useTranslation(); const iconRef = useRef(null); @@ -43,6 +45,14 @@ export const DocIcon = ({ return defaultIcon; } + const emojiLabel = withEmojiPicker + ? emoji + ? t('Edit document emoji') + : t('Add emoji') + : emoji + ? t('Document emoji') + : undefined; + const toggleEmojiPicker = (e: MouseEvent) => { if (withEmojiPicker) { e.stopPropagation(); @@ -83,6 +93,8 @@ export const DocIcon = ({ ref={iconRef} onClick={toggleEmojiPicker} color="tertiary-text" + aria-label={emojiLabel} + title={emojiLabel} {...buttonProps} > {!emoji ? ( diff --git a/src/frontend/apps/impress/src/features/docs/doc-share/components/DocShareModal.tsx b/src/frontend/apps/impress/src/features/docs/doc-share/components/DocShareModal.tsx index f2cf6b9c..32030281 100644 --- a/src/frontend/apps/impress/src/features/docs/doc-share/components/DocShareModal.tsx +++ b/src/frontend/apps/impress/src/features/docs/doc-share/components/DocShareModal.tsx @@ -199,7 +199,6 @@ export const DocShareModal = ({ doc, onClose, isRootDoc = true }: Props) => { }