Skip to content

Add tabbing for files actions menu - #39098

Closed
nfebe wants to merge 1 commit into
masterfrom
36989-keep-focus-in-container
Closed

Add tabbing for files actions menu#39098
nfebe wants to merge 1 commit into
masterfrom
36989-keep-focus-in-container

Conversation

@nfebe

@nfebenfebe commented Jul 1, 2023

Copy link
Copy Markdown
Contributor

Resolves : #36989

Before

before.webm

After

after.webm

@nfebe
nfebeforce-pushed the 36989-keep-focus-in-container branch 2 times, most recently from f270e6f to 936a04eCompareJuly 1, 2023 12:13
@nfebenfebe changed the title feat: Add tabbing restriction module for improved accessibilityAdd tabbing restriction module for improved accessibilityJul 1, 2023
@solracsfsolracsf added this to the Nextcloud 28 milestone Jul 1, 2023
@solracsfsolracsf added the 3. to review Waiting for reviews label Jul 1, 2023
@nfebe

nfebe commented Jul 1, 2023

Copy link
Copy Markdown
ContributorAuthor

I should have put this in draft first, sorry about that folks but this is not ready for review as the implementation need to be tested with at least one modal for correctness and in this case that is #36989. (See todo in PR description)

@nfebe
nfebeforce-pushed the 36989-keep-focus-in-container branch 4 times, most recently from db6ead6 to 89c1887CompareJuly 4, 2023 15:21
@AndyScherzinger
AndyScherzinger requested review from artonge, skjnldsv and susnux and removed request for AndyScherzingerJuly 4, 2023 16:19
@Pytal

Pytal commented Jul 5, 2023

Copy link
Copy Markdown
Member

I believe this is functionally identical to https://github.com/focus-trap/focus-trap?

If so then we can use the lib instead i.e. #37780

@nfebe

nfebe commented Jul 5, 2023

Copy link
Copy Markdown
ContributorAuthor

Thanks @Pytal! Did not know of this. Even though it was tricky to write this, that looks solid!

One question, focus-trap library deactivates clicks outside the focus container. The way most modals and elements that need focus trap is when you click outside the container, the modals would close, would the new behavior be okay? (It's configurable)

@nfebe
nfebeforce-pushed the 36989-keep-focus-in-container branch from 89c1887 to 6a953faCompareJuly 5, 2023 16:35
context.$file.removeClass('mouseOver');
$trigger.removeClass('open');
$trigger.attr('aria-expanded', 'false');
menuFocusTrap.deactivate()

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

This only works when the user clicks on the same button that triggered files menu. If the user clicks else-where on the document which closes the menu, proper focus is not restored.

PS : @susnux@Pytal do you know where "background click closes menu" is handled?

Resolves : #36989
Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
@nfebe
nfebeforce-pushed the 36989-keep-focus-in-container branch from 6a953fa to eef9bccCompareJuly 5, 2023 16:41
@nfebenfebe changed the title Add tabbing restriction module for improved accessibilityAdd tabbing for files actions menuJul 5, 2023
@skjnldsv

Copy link
Copy Markdown
Member

Kinda the same, files to vue already fixes it 🙈

@nfebenfebe closed this Jul 6, 2023
@skjnldsv
skjnldsv deleted the 36989-keep-focus-in-container branch March 14, 2024 07:50
@skjnldsvskjnldsv removed this from the Nextcloud 28 milestone Aug 14, 2024
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviews

Projects

None yet

4 participants

@nfebe@Pytal@skjnldsv@solracsf