Skip to content

Commit 0d596e3

Browse files
committed
✨(frontend) move editor button out of grid and fix roles/aria-label
improves accessibility and layout consistency of editor interface Signed-off-by: Cyril <c.gromoff@gmail.com>
1 parent 3ab01c9 commit 0d596e3

File tree

5 files changed

+26
-18
lines changed

5 files changed

+26
-18
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ and this project adheres to
66

77
## [Unreleased]
88

9+
### Fixed
10+
11+
- ♿(frontend) improve accessibility:
12+
- ♿(frontend) improve ARIA in doc grid and editor for a11y #1519
13+
914
## [3.9.0] - 2025-11-10
1015

1116
### Added

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ export const BlockNoteEditor = ({ doc, provider }: BlockNoteEditorProps) => {
186186
formattingToolbar={false}
187187
slashMenu={false}
188188
theme="light"
189+
aria-label={t('Document editor')}
189190
>
190191
<BlockNoteSuggestionMenu />
191192
<BlockNoteToolbar />
@@ -200,6 +201,7 @@ interface BlockNoteReaderProps {
200201

201202
export const BlockNoteReader = ({ initialContent }: BlockNoteReaderProps) => {
202203
const { setEditor } = useEditorStore();
204+
const { t } = useTranslation();
203205
const editor = useCreateBlockNote(
204206
{
205207
collaboration: {
@@ -231,6 +233,7 @@ export const BlockNoteReader = ({ initialContent }: BlockNoteReaderProps) => {
231233
editor={editor}
232234
editable={false}
233235
theme="light"
236+
aria-label={t('Document version viewer')}
234237
formattingToolbar={false}
235238
slashMenu={false}
236239
/>

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)