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

Default table of contents to open on mobile #792

Merged
merged 1 commit into from
Oct 23, 2023
Merged

Conversation

lukekarrys
Copy link
Contributor

@lukekarrys lukekarrys commented Oct 23, 2023

After #767, the table of contents used the useDetails() hook from @primer/react.

I believe #775 was reviewed to close https://github.com/github/accessibility-audits/issues/5936 and https://github.com/github/accessibility-audits/issues/5940. This PR implements a similar fix to #775 where the table of contents will always be open by default on small screens. One difference is that since it uses the useDetails() hook, if the user closes the table of contents, it will remain closed for the rest of the session.

Closes #776
Closes #775

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.

1 participant