Skip to content

[AX] Localnav should not FocusTrap for documentation pages #341

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

Conversation

marinaaisa
Copy link
Member

Bug/issue #94044029, if applicable:

Summary

Localnav should not FocusTrap for documentation pages but we should keep it for the rest of the pages.

This is because localnav in small viewports in documentation pages is very small, only has 2 items, and it doesn’t feel like a modal, it’s more like a collapse element.

Dependencies

NA

Testing

Steps:

  1. Using SlothCreator, run DocC Render
  2. Go to http://localhost:8080/documentation/slothcreator
  3. Go into a small viewport
  4. Open the localnav
  5. Assert that when tabbing focus doesn't get trap in the localnav

Checklist

Make sure you check off the following items. If they cannot be completed, provide a reason.

  • Added tests
  • Ran npm test, and it succeeded
  • Updated documentation if necessary

Copy link
Contributor

@dobromir-hristov dobromir-hristov left a comment

Choose a reason for hiding this comment

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

I am not an AX expert, so I cant say what is right or wrong here, I just want to point out that there are occasions, where docs can have 6 links with breadcrumbs, language toggles and so on.

@@ -226,6 +232,7 @@ export default {
this.isTransitioning = false;
if (this.isOpen) {
this.$emit('opened');
if (this.preventFocusTrap) return;
Copy link
Contributor

Choose a reason for hiding this comment

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

should we also prevent scroll locking? At this point we are going into mobile viewport territory.

@marinaaisa
Copy link
Member Author

Closed in favor of #427

@marinaaisa marinaaisa closed this May 19, 2023
@marinaaisa marinaaisa deleted the r94044029/focus-trap-documentation branch May 19, 2023 17:15
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