Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: If a aria-selected button is present we focus on this one instead of the first entry #4678

Merged
merged 1 commit into from
Oct 20, 2023

Conversation

juliusknorr
Copy link
Contributor

@juliusknorr juliusknorr commented Oct 20, 2023

Signed-off-by: Julius Härtl jus@bitgrid.net

☑️ Resolves

Fixes nextcloud/text#3864

I checked and it seems we cannot easily or nicely change the initial focus of the NcActions entires. (unless we consider using setTimeout an option) within text. Now we don't have a real active state in the NcAction* components which we could use to pick the initial focus element, however since this initial focus handling is mostly bound to accessibility I decided to make a change of the initial focus depending on if any NcAction* entry is indicating a selected state with aria-selected.

🏁 Checklist

  • ⛑️ Tests are included or are not applicable
  • 📘 Component documentation has been extended, updated or is not applicable

…d of the first entry

Signed-off-by: Julius Härtl <jus@bitgrid.net>
@susnux susnux merged commit bef86eb into master Oct 20, 2023
14 checks passed
@susnux susnux deleted the a11y/selected-actions-focus branch October 20, 2023 12:52
@Pytal Pytal mentioned this pull request Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BITV] 9.2.4.3/3.10 - Keep focus on selected option in submenus
4 participants