Skip to content

Conversation

@Ovgodd
Copy link
Collaborator

@Ovgodd Ovgodd commented Dec 4, 2025

Purpose

Fix several Axe accessibility issues (landmarks, button names, editor label, modals).

Proposal

  • Move the footer on /home outside of <main> so contentinfo is a sibling landmark.
  • Add aria-label/title to icon-only buttons (e.g. document emoji) so they have discernible text.
  • In BlockNoteEditor, label the real editable node .ProseMirror.bn-edito and remove aria-labelfromBlockNoteView`. s a
  • Fix close button that was'nt focusable in DocShareModal.tsx

@Ovgodd Ovgodd requested a review from AntoLC December 4, 2025 10:44
@Ovgodd Ovgodd self-assigned this Dec 4, 2025
@Ovgodd Ovgodd changed the title ✨(frontend) add missing label to improve accessibility and pass axe c… ♿(frontend) add missing label and fix Axes errors to improve a11y Dec 4, 2025
@Ovgodd Ovgodd force-pushed the fix/a11y-axe-errors branch 2 times, most recently from d13f89f to 4d7b2cf Compare December 4, 2025 10:46
…hecks

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

Signed-off-by: Cyril <[email protected]>
@Ovgodd Ovgodd force-pushed the fix/a11y-axe-errors branch from 4d7b2cf to b8a5e53 Compare December 4, 2025 10:46
@Ovgodd Ovgodd marked this pull request as ready for review December 4, 2025 10:46
@github-actions
Copy link

github-actions bot commented Dec 4, 2025

Size Change: +138 B (0%)

Total Size: 4.11 MB

Filename Size Change
apps/impress/out/_next/static/fafa6d74/_buildManifest.js 0 B -906 B (removed) 🏆
apps/impress/out/_next/static/5d1b63a7/_buildManifest.js 905 B +905 B (new file) 🆕

compressed-size-action

Comment on lines +88 to +89
aria-label={t(emoji ? 'Edit document emoji' : 'Add emoji')}
title={t(emoji ? 'Edit document emoji' : 'Add emoji')}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parser cannot extract the translation if the ternaire is inside the t

Suggested change
aria-label={t(emoji ? 'Edit document emoji' : 'Add emoji')}
title={t(emoji ? 'Edit document emoji' : 'Add emoji')}
aria-label={emoji ? t('Edit document emoji') : t('Add emoji')}
title={emoji ? t('Edit document emoji') : t('Add emoji')}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is cases where we cannot add emoji, so t('Add emoji') should not be everytime as a fallback, it depends if the user has the editing rights.

withEmojiPicker={doc.abilities.partial_update}

editor={editor}
editable={false}
theme="light"
aria-label={t('Document viewer')}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You will not have any aria-label here so.

Comment on lines +197 to +233
useEffect(() => {
if (!refEditorContainer.current) {
return;
}

const setEditorAriaAttributes = () => {
const editorElement =
refEditorContainer.current?.querySelector<HTMLElement>(
'.ProseMirror.bn-editor[contenteditable="true"]',
);

if (!editorElement) {
return;
}

const label = t('Document editor');

editorElement.setAttribute('aria-label', label);
editorElement.setAttribute('title', label);
};

setEditorAriaAttributes();

const observer = new MutationObserver(() => {
setEditorAriaAttributes();
});

observer.observe(refEditorContainer.current, {
childList: true,
subtree: true,
});

return () => {
observer.disconnect();
};
}, [t]);

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find it is overkill to add all this code to have a aria-label and title.
Adding a title will impact the readibility as well:

Image

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We now have a double scroll on the homepage, plus a kind of a fix position on the footer:

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants