If I follow a link that takes me directly to a sub-section within an article — for example: https://en.wikipedia.org/wiki/Paris#Tourism — the section (in this case Economy) should be expanded automatically, and the sub-section (in this case Tourism) should be bolded.
|what currently happens||what should happen|
If the section is near the bottom of the page, the section doesn't bold at all (more details in T330118).
As browsers can differ in their scroll behavior, please perform the following steps on Chrome, Edge, Safari, and Firefox. Please also note that the banners that can appear on beta can cause failures (see my note below):
When visiting a page with a hash fragment at the bottom of the page
- Visit https://en.wikipedia.beta.wmflabs.org/wiki/Sports-toc-test#References
- Verify that "References" appears bold in the TOC
When visiting a page with a hash fragment in the middle of the page
- Visit https://en.wikipedia.beta.wmflabs.org/wiki/Sports-toc-test#2022_European_Sambo_Cup
- Verify that "Sambo" is black (but not bold) and expanded. Verify that "2022 European Sambo Cup" is bolded. The scroll position should also correspond to this section.
- Scroll to the bottom of the TOC and click "References".
- Verify that "References" is bolded.
- Change your browser's location url to be https://en.wikipedia.beta.wmflabs.org/wiki/Sports-toc-test#2021%E2%80%9322_PSA_World_Tour
- Verify that "Squash" is black (but not bold) and expanded. Verify that "2021–22 PSA World Tour" is bolded.
When visiting a page without a hash fragment.
- Visit https://en.wikipedia.beta.wmflabs.org/wiki/Sports-toc-test
- Verify that "Beginning" is bolded
If you observe any failures, it is most likely from the banners that sometimes load and cause a substantial layout shift/scroll event (T52865, T286658). This makes the code think that the user scrolled, and it reacts by bolding the section at the current scroll position instead of the one that corresponds to the hash fragment. You can confirm this is the cause by clicking on their respective hide buttons (pictured below) and refreshing the page. I noticed this on the first test case, but it went away after closing the banners and refreshing, so I'm not sure how much effort should go into fixing it.
@ovasileva I'm happy to create a new ticket for this case if needed.
QA Results - Beta