Skip to content

feat(navigation) - add inert attribute to NavExpandable #11749

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Mash707
Copy link
Contributor

@Mash707 Mash707 commented Apr 9, 2025

Closes #11732

@patternfly-build
Copy link
Contributor

patternfly-build commented Apr 9, 2025

@Mash707
Copy link
Contributor Author

Mash707 commented Apr 9, 2025

@thatblindgeye should I also include a cypress test? There was some doubt regarding it in the issue.

Copy link
Contributor

@thatblindgeye thatblindgeye left a comment

Choose a reason for hiding this comment

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

One file comment below. As for your question, we could probably handle testing in the unit tests. Ideally off the top of my head we'd want the following tests:

  • check that inert is on the <section> element by default
  • check that inert is NOT on the <section> when isExpanded is true

Then utilizing userEvents:

  • click the expandable toggle to expand it, then tab() and assert that first item is focused
  • click the expandable toggle to collapse it, then tab() and assert that the first item within that section doesn't have focus

We'd also want these to be in a new NavExpandable.test.tsx file. If you have any questions or run into any issues just let me know

@Mash707
Copy link
Contributor Author

Mash707 commented Apr 9, 2025

Thanks for the amazing instructions, will start working on the unit test.

@Mash707 Mash707 force-pushed the navigation-add-inert-attribute branch from 3d1172f to 5992339 Compare April 14, 2025 19:00
@Mash707
Copy link
Contributor Author

Mash707 commented Apr 14, 2025

  • check that inert is on the
    element by default
  • check that inert is NOT on the
    when isExpanded is true

@thatblindgeye I have added tests regarding these two. Let me know what you think

@Mash707 Mash707 requested a review from thatblindgeye April 14, 2025 19:04
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.

Navigation - add inert attribute to content within a collapsed group
3 participants