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

PRO-4431: Context menu dynamic focus trap [a11y] #4815

Merged
merged 3 commits into from
Dec 3, 2024
Merged

Conversation

myovchev
Copy link
Contributor

Summary

  • Adds support for dynamic focus trap in Context menus (prop dynamicFocus). When set to true, the focusable elements are recalculated on each cycle step.
  • Adds option to disable tabindex on AposToggle component. A new prop noFocus can be set to false to disable the focus on the toggle button. It's enabled by default.

What are the specific steps to test this change?

Test on Document Versions modal context menu View Options.

What kind of change does this PR introduce?

(Check at least one)

  • Bug fix
  • New feature
  • Refactor
  • Documentation
  • Build-related changes
  • Other

Make sure the PR fulfills these requirements:

  • It includes a) the existing issue ID being resolved, b) a convincing reason for adding this feature, or c) a clear description of the bug it resolves
  • The changelog is updated
  • Related documentation has been updated
  • Related tests have been updated

If adding a new feature without an already open issue, it's best to open a feature request issue first and wait for approval before working on it.

Other information:

Copy link

linear bot commented Nov 24, 2024

Copy link
Member

@stuartromanek stuartromanek left a comment

Choose a reason for hiding this comment

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

Instead of re-querying on tab, should we be using a mutation observer on the element we want to confine focus to and querying then?

@myovchev myovchev merged commit 21dc56e into main Dec 3, 2024
9 checks passed
@myovchev myovchev deleted the PRO-4431-a11y branch December 3, 2024 13:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants