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

Sidebar disappears when linking to an anchor or using the table of contents on WCAG 2.2 web page if Reduced Motion is turned on #4051

Open
amberhinds opened this issue Sep 2, 2024 · 0 comments
Assignees

Comments

@amberhinds
Copy link

amberhinds commented Sep 2, 2024

This issue pertains to https://www.w3.org/TR/WCAG22/ please let me know if I am not posting it in the right place.

In multiple browsers, after clicking one of the anchor links in the table of contents or if linking directly to the page with an anchor appended on the URL, the table of contents sidebar disappears and cannot be restored.

Here is a video that shows the behavior I am seeing.

There are no console errors.

When I inspect the code, this appears to be a bug related to the prefers reduced motion CSS:

@media (prefers-reduced-motion: reduce) {
    body.toc-sidebar #toc {
        position: absolute;
        overflow: initial;
        bottom: unset;
    }
}

I do have reduced motion turned on in my OS. If I turn off reduced motion, the sidebar stays visible when interacting with it. If I inspect the code and disable the position:absolute in the reduced motion media query above, it works as expected.

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

No branches or pull requests

3 participants