Skip to content

Commit 2479427

Browse files
committed
moved button out of grid, fixed roles, and added aria-label to editor
Signed-off-by: Cyril <c.gromoff@gmail.com>
1 parent 145c688 commit 2479427

File tree

5 files changed

+28
-19
lines changed

5 files changed

+28
-19
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ and this project adheres to
1515

1616
- 🐛(frontend) fix duplicate document entries in grid #1479
1717
- 🐛(frontend) show full nested doc names with ajustable bar #1456
18+
- ♿(frontend) improve accessibility:
19+
- ♿(frontend) improve ARIA in document grid and editor for a11y compliance #1519
1820

1921
## [3.8.2] - 2025-10-17
2022

src/frontend/apps/impress/src/features/docs/doc-editor/components/BlockNoteEditor.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,7 @@ export const BlockNoteEditor = ({ doc, provider }: BlockNoteEditorProps) => {
203203
slashMenu={false}
204204
editable={!readOnly}
205205
theme="light"
206+
aria-label={t('Document editor')}
206207
>
207208
<BlockNoteSuggestionMenu />
208209
<BlockNoteToolbar />
@@ -219,6 +220,7 @@ export const BlockNoteEditorVersion = ({
219220
initialContent,
220221
}: BlockNoteEditorVersionProps) => {
221222
const readOnly = true;
223+
const { t } = useTranslation();
222224
const editor = useCreateBlockNote(
223225
{
224226
collaboration: {
@@ -236,7 +238,12 @@ export const BlockNoteEditorVersion = ({
236238

237239
return (
238240
<Box $css={cssEditor(readOnly, true)} className="--docs--editor-container">
239-
<BlockNoteView editor={editor} editable={!readOnly} theme="light" />
241+
<BlockNoteView
242+
editor={editor}
243+
editable={!readOnly}
244+
theme="light"
245+
aria-label={t('Document version viewer')}
246+
/>
240247
</Box>
241248
);
242249
};

src/frontend/apps/impress/src/features/docs/docs-grid/components/DocsGrid.tsx

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -152,23 +152,23 @@ export const DocsGrid = ({
152152
<DocGridContentList docs={docs} />
153153
)}
154154
</Box>
155-
{hasNextPage && !loading && (
156-
<InView
157-
data-testid="infinite-scroll-trigger"
158-
as="div"
159-
onChange={loadMore}
160-
>
161-
{!isFetching && hasNextPage && (
162-
<Button
163-
onClick={() => void fetchNextPage()}
164-
color="primary-text"
165-
>
166-
{t('More docs')}
167-
</Button>
168-
)}
169-
</InView>
170-
)}
171155
</Box>
156+
{hasNextPage && !loading && (
157+
<InView
158+
data-testid="infinite-scroll-trigger"
159+
as="div"
160+
onChange={loadMore}
161+
>
162+
{!isFetching && hasNextPage && (
163+
<Button
164+
onClick={() => void fetchNextPage()}
165+
color="primary-text"
166+
>
167+
{t('More docs')}
168+
</Button>
169+
)}
170+
</InView>
171+
)}
172172
</Box>
173173
)}
174174
</Card>

src/frontend/apps/impress/src/features/docs/docs-grid/components/Draggable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export const Draggable = <T,>(props: DraggableProps<T>) => {
1919
{...attributes}
2020
data-testid={`draggable-doc-${props.id}`}
2121
className="--docs--grid-draggable"
22-
role="presentation"
22+
role="none"
2323
>
2424
{props.children}
2525
</div>

src/frontend/apps/impress/src/features/docs/docs-grid/components/Droppable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export const Droppable = ({
3535
<Box
3636
ref={setNodeRef}
3737
data-testid={`droppable-doc-${id}`}
38-
role="presentation"
38+
role="none"
3939
$css={css`
4040
border-radius: 4px;
4141
background-color: ${enableHover

0 commit comments

Comments
 (0)