Skip to content

Conversation

Ovgodd
Copy link
Collaborator

@Ovgodd Ovgodd commented Sep 8, 2025

Purpose

Enable keyboard accessibility for opening documents and subdocuments via the Enter key. This improves usability and accessibility for users navigating with the keyboard.

Proposal

  • Enable opening of a document when pressing Enter
  • Enable opening of a subdocument when pressing Enter
  • Navigation within the submenu (options, actions, etc.) will be handled in a separate PR

@Ovgodd Ovgodd self-assigned this Sep 8, 2025
@Ovgodd Ovgodd force-pushed the fix/keyboard-activate-doc branch 5 times, most recently from d60dd31 to 884a5a0 Compare September 9, 2025 05:43
@Ovgodd Ovgodd requested a review from AntoLC September 9, 2025 07:24
@Ovgodd Ovgodd marked this pull request as ready for review September 9, 2025 07:24
@Ovgodd Ovgodd force-pushed the fix/keyboard-activate-doc branch from 884a5a0 to a64085f Compare September 9, 2025 11:03
Copy link

github-actions bot commented Sep 9, 2025

Size Change: +620 B (+0.02%)

Total Size: 3.66 MB

Filename Size Change
apps/impress/out/_next/static/370acbe7/_buildManifest.js 0 B -889 B (removed) 🏆
apps/impress/out/_next/static/chunks/8495.js 49.8 kB +634 B (+1.29%)
apps/impress/out/_next/static/73ce9e73/_buildManifest.js 889 B +889 B (new file) 🆕

compressed-size-action

@Ovgodd Ovgodd force-pushed the fix/keyboard-activate-doc branch 6 times, most recently from 2746c9e to 58c0b5d Compare September 10, 2025 07:38
@Ovgodd Ovgodd marked this pull request as draft September 10, 2025 07:51
@Ovgodd Ovgodd force-pushed the fix/keyboard-activate-doc branch 4 times, most recently from 4bbfebe to cab4f61 Compare September 10, 2025 08:52
@Ovgodd Ovgodd marked this pull request as ready for review September 10, 2025 09:11
Copy link
Collaborator

@AntoLC AntoLC left a comment

Choose a reason for hiding this comment

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

As seen together, some display errors to fix.

@Ovgodd Ovgodd requested a review from AntoLC September 15, 2025 06:15
@Ovgodd Ovgodd force-pushed the fix/keyboard-activate-doc branch from f5323cf to 773b150 Compare September 15, 2025 06:17
Copy link
Collaborator

@AntoLC AntoLC left a comment

Choose a reason for hiding this comment

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

There is still differences with what is in production, the action buttons are on the top of the div now, the option button has lost the "cursor pointer":
image

@Ovgodd Ovgodd force-pushed the fix/keyboard-activate-doc branch from 92fbf03 to 104e14f Compare September 15, 2025 13:06
@Ovgodd Ovgodd force-pushed the fix/keyboard-activate-doc branch from 104e14f to dd6c64c Compare September 15, 2025 13:15
@Ovgodd Ovgodd requested a review from AntoLC September 15, 2025 13:22
@Ovgodd Ovgodd force-pushed the fix/keyboard-activate-doc branch 2 times, most recently from 1697f78 to 85e27c5 Compare September 15, 2025 14:53
Copy link
Collaborator

@AntoLC AntoLC left a comment

Choose a reason for hiding this comment

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

Not sure why, after a certain depth, the text is not on the left side, adding text-align:left; seems to fix this issue.

image

$width="100%"
className="--docs--simple-doc-item"
role="presentation"
aria-label={`${t('Open document')} ${doc.title || untitledDocument}`}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
aria-label={`${t('Open document')} ${doc.title || untitledDocument}`}
aria-label={`${t('Open document {{title}}', {title: doc.title || untitledDocument})}

$align="center"
className="light-doc-item-actions"
role="toolbar"
aria-label={`${t('Actions for')} ${docTitle}`}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
aria-label={`${t('Actions for')} ${docTitle}`}
aria-label={`${t('Actions for {{title}}', {title: ${docTitle}`})}

Copy link
Collaborator

Choose a reason for hiding this comment

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

Folder hooks should be out of folder components.

@Ovgodd Ovgodd force-pushed the fix/keyboard-activate-doc branch from dd030a2 to ee66426 Compare September 16, 2025 06:41
@Ovgodd Ovgodd requested a review from AntoLC September 16, 2025 06:41
Copy link
Collaborator

@AntoLC AntoLC left a comment

Choose a reason for hiding this comment

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

Looks good, work great !

action();
}
};
const treeEl = document.querySelector<HTMLElement>('.c__tree-view');
Copy link
Collaborator

Choose a reason for hiding this comment

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

.c__tree-view could be a prop of this hook, it will then be a nice totally generic hook that you could reuse in different part of the app, that could live in src/hook, wdyt ?

Suggested change
const treeEl = document.querySelector<HTMLElement>('.c__tree-view');
const elSelected = document.querySelector<HTMLElement>(selector);

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Great idea! Can't believe I didn't think of that sooner.

@Ovgodd Ovgodd force-pushed the fix/keyboard-activate-doc branch 2 times, most recently from e9fe0a8 to f1a9252 Compare September 16, 2025 08:26
added keyboard support to open docs and subdocs using the enter key

Signed-off-by: Cyril <[email protected]>
@Ovgodd Ovgodd force-pushed the fix/keyboard-activate-doc branch 2 times, most recently from 3381269 to e290543 Compare September 16, 2025 08:45
aligns focus state with app style by adding background shadow to outline

Signed-off-by: Cyril <[email protected]>
@Ovgodd Ovgodd force-pushed the fix/keyboard-activate-doc branch from e290543 to 69e7235 Compare September 16, 2025 08:56
@Ovgodd Ovgodd merged commit 69e7235 into main Sep 16, 2025
21 of 22 checks passed
@Ovgodd Ovgodd deleted the fix/keyboard-activate-doc branch September 16, 2025 09:38
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.

2 participants