(frontend) add missing label to improve a11y and pass axe checks

enhances a11y by adding label to fix axe tool errors on missing attributes

Signed-off-by: Cyril <c.gromoff@gmail.com>
This commit is contained in:
Cyril
2025-12-03 13:30:00 +01:00
parent 7823303d03
commit b1a18b2477
4 changed files with 15 additions and 5 deletions

View File

@@ -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

View File

@@ -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}

View File

@@ -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<HTMLDivElement>(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 ? (

View File

@@ -199,7 +199,6 @@ export const DocShareModal = ({ doc, onClose, isRootDoc = true }: Props) => {
<ButtonCloseModal
aria-label={t('Close the share modal')}
onClick={onClose}
tabIndex={-1}
/>
</Box>
}