✨(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:
@@ -17,6 +17,7 @@ and this project adheres to
|
|||||||
### Fixed
|
### Fixed
|
||||||
|
|
||||||
- ✅(backend) reduce flakiness on backend test #1769
|
- ✅(backend) reduce flakiness on backend test #1769
|
||||||
|
- 🐛(frontend) fix clickable main content regression #1773
|
||||||
- 🐛(backend) fix TRASHBIN_CUTOFF_DAYS type error #1778
|
- 🐛(backend) fix TRASHBIN_CUTOFF_DAYS type error #1778
|
||||||
|
|
||||||
### Security
|
### Security
|
||||||
@@ -27,6 +28,7 @@ and this project adheres to
|
|||||||
|
|
||||||
- ♿(frontend) improve accessibility:
|
- ♿(frontend) improve accessibility:
|
||||||
- ♿(frontend) make html export accessible to screen reader users #1743
|
- ♿(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
|
## [4.3.0] - 2026-01-05
|
||||||
|
|
||||||
@@ -46,7 +48,6 @@ and this project adheres to
|
|||||||
|
|
||||||
- 🐛(frontend) fix tables deletion #1739
|
- 🐛(frontend) fix tables deletion #1739
|
||||||
- 🐛(frontend) fix children not display when first resize #1753
|
- 🐛(frontend) fix children not display when first resize #1753
|
||||||
- 🐛(frontend) fix clickable main content regression #1773
|
|
||||||
|
|
||||||
## [4.2.0] - 2025-12-17
|
## [4.2.0] - 2025-12-17
|
||||||
|
|
||||||
|
|||||||
@@ -259,7 +259,6 @@ export const BlockNoteReader = ({
|
|||||||
const { user } = useAuth();
|
const { user } = useAuth();
|
||||||
const { setEditor } = useEditorStore();
|
const { setEditor } = useEditorStore();
|
||||||
const { threadStore } = useComments(docId, false, user);
|
const { threadStore } = useComments(docId, false, user);
|
||||||
const { t } = useTranslation();
|
|
||||||
const editor = useCreateBlockNote(
|
const editor = useCreateBlockNote(
|
||||||
{
|
{
|
||||||
collaboration: {
|
collaboration: {
|
||||||
@@ -305,7 +304,6 @@ export const BlockNoteReader = ({
|
|||||||
editor={editor}
|
editor={editor}
|
||||||
editable={false}
|
editable={false}
|
||||||
theme="light"
|
theme="light"
|
||||||
aria-label={t('Document viewer')}
|
|
||||||
formattingToolbar={false}
|
formattingToolbar={false}
|
||||||
slashMenu={false}
|
slashMenu={false}
|
||||||
comments={false}
|
comments={false}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import { MouseEvent, useRef, useState } from 'react';
|
import { MouseEvent, useRef, useState } from 'react';
|
||||||
import { createPortal } from 'react-dom';
|
import { createPortal } from 'react-dom';
|
||||||
|
import { useTranslation } from 'react-i18next';
|
||||||
|
|
||||||
import { BoxButton, BoxButtonType, Text, TextType } from '@/components';
|
import { BoxButton, BoxButtonType, Text, TextType } from '@/components';
|
||||||
import { EmojiPicker, emojidata } from '@/docs/doc-editor/';
|
import { EmojiPicker, emojidata } from '@/docs/doc-editor/';
|
||||||
@@ -30,6 +31,7 @@ export const DocIcon = ({
|
|||||||
...textProps
|
...textProps
|
||||||
}: DocIconProps) => {
|
}: DocIconProps) => {
|
||||||
const { updateDocEmoji } = useDocTitleUpdate();
|
const { updateDocEmoji } = useDocTitleUpdate();
|
||||||
|
const { t } = useTranslation();
|
||||||
|
|
||||||
const iconRef = useRef<HTMLDivElement>(null);
|
const iconRef = useRef<HTMLDivElement>(null);
|
||||||
|
|
||||||
@@ -43,6 +45,14 @@ export const DocIcon = ({
|
|||||||
return defaultIcon;
|
return defaultIcon;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const emojiLabel = withEmojiPicker
|
||||||
|
? emoji
|
||||||
|
? t('Edit document emoji')
|
||||||
|
: t('Add emoji')
|
||||||
|
: emoji
|
||||||
|
? t('Document emoji')
|
||||||
|
: undefined;
|
||||||
|
|
||||||
const toggleEmojiPicker = (e: MouseEvent) => {
|
const toggleEmojiPicker = (e: MouseEvent) => {
|
||||||
if (withEmojiPicker) {
|
if (withEmojiPicker) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
@@ -83,6 +93,8 @@ export const DocIcon = ({
|
|||||||
ref={iconRef}
|
ref={iconRef}
|
||||||
onClick={toggleEmojiPicker}
|
onClick={toggleEmojiPicker}
|
||||||
color="tertiary-text"
|
color="tertiary-text"
|
||||||
|
aria-label={emojiLabel}
|
||||||
|
title={emojiLabel}
|
||||||
{...buttonProps}
|
{...buttonProps}
|
||||||
>
|
>
|
||||||
{!emoji ? (
|
{!emoji ? (
|
||||||
|
|||||||
@@ -199,7 +199,6 @@ export const DocShareModal = ({ doc, onClose, isRootDoc = true }: Props) => {
|
|||||||
<ButtonCloseModal
|
<ButtonCloseModal
|
||||||
aria-label={t('Close the share modal')}
|
aria-label={t('Close the share modal')}
|
||||||
onClick={onClose}
|
onClick={onClose}
|
||||||
tabIndex={-1}
|
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user