Resolves "Handbook pages sometimes reflow after loading, moving content targeted by fragment identifiers."
This MR tries to solve the problem described in #5588 (closed) by:
- If there is JS support, we can hide the ToC when it hasn't been moved to the aside because it will be moved by JS
- If there is no JS support,
.html--js
will not be applied. So these rules will not be activated. Allowing the ToC to be crawled and read by Assistive Technology (eg.: screenreaders).
Demo
- Before: https://about.gitlab.com/handbook/#engineering
- With this MR: https://5588-andr3-avoid-toc-sudden-jump-on-page-load.about.gitlab-review.app/handbook/#engineering
Closes #5588 (closed)
Edited by André Luís