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

Docs: Extend Top Link Disclosure example to include toggles for sub-submenus #301

Open
matt-bernhardt opened this issue Mar 19, 2024 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@matt-bernhardt
Copy link

Summary

The example codepen for the Top Link Disclosure Menu has separate elements for the top level link, and a toggle to display the submenu (which is the point of this demonstration as I understand it, and the thing I'm trying to implement in one of our menus).

However, this pattern is then not extended into to the submenu links themselves - despite the library apparently supporting this option via the submenuSubtoggleSelector option.

Solution

Could the Top Link Disclosure example extend its use of toggles throughout the example?

Alternatives

If the default example shouldn't be extended in this way (doing so would make the name "Top link disclosure" someone inaccurate), could the body copy in the codepen be updated to include a reference to this feature for others to implement more easily?

Additional context

I should note that it took me only a few minutes of looking through the source code for this library to discover the needed parameter, and a bit of fiddling in a fork of the CodePen to confirm that the argument would solve the problem I was trying to address. As such, I don't think the existing documentation is broken.

This is also not a bug in the actual library (which I initially thought might be the case, until I looked through the source code and found the submenuSubtoggleSelector argument in the constructor.

@matt-bernhardt matt-bernhardt added the documentation Improvements or additions to documentation label Mar 19, 2024
@NickDJM
Copy link
Owner

NickDJM commented Mar 19, 2024

@matt-bernhardt thanks for the issue!

I’m hesitant to update the main codepen with this because it’s not a default for top-link disclosure menus (it was a call I had to make since the ARIA APG doesn’t show any examples of 3+ level menus).

That being said, I’d like to create a series of examples with customized features/advanced use cases and this would be a perfect entry.

I’ll look into starting that section of the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants