[wp-meta] [Making WordPress.org] #8203: Plugin Directory: FAQ accordion causes page to scroll/jump when opening items due to URL hash update
Making WordPress.org
noreply at wordpress.org
Wed Mar 25 08:16:30 UTC 2026
#8203: Plugin Directory: FAQ accordion causes page to scroll/jump when opening
items due to URL hash update
------------------------------+---------------------
Reporter: raftaar1191 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone:
Component: Plugin Directory | Resolution:
Keywords: needs-patch |
------------------------------+---------------------
Comment (by raftaar1191):
The expected behavior when clicking on an FAQ title should be limited to
toggling the visibility of the corresponding answer, without affecting the
page scroll position.
The page reload issue appears to be resolved now. However, clicking the
FAQ title still triggers anchor navigation, which causes the page to jump
(in some cases to the top). This leads to an inconsistent experience when
navigating through multiple FAQs.
Ideally:
* The interaction should behave like a standard accordion (expand/collapse
in place)
* The scroll position should remain unchanged
* If anchor links are required for accessibility or deep linking, the
default navigation should be prevented and handled programmatically
A few reference implementations that demonstrate the expected behavior:
*
[[https://getbootstrap.com/docs/5.0/components/accordion/](https://getbootstrap.com/docs/5.0/components/accordion/)
Bootstrap Accordion]
*
[[https://www.w3.org/WAI/ARIA/apg/patterns/accordion/](https://www.w3.org/WAI/ARIA/apg/patterns/accordion/)
WAI-ARIA Accordion Pattern]
* [[https://jqueryui.com/accordion/](https://jqueryui.com/accordion/)
jQuery UI Accordion]
All of the above implementations ensure that toggling content does not
interfere with the current scroll position and follows accessible
interaction patterns.
A more robust approach here would be to use `<button>` elements for
toggling, or explicitly prevent the default anchor behavior to avoid
unintended scrolling.
Video Proof:
https://youtu.be/aZj_PgjPyHA
--
Ticket URL: <https://meta.trac.wordpress.org/ticket/8203#comment:5>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org
More information about the wp-meta
mailing list