Scroll to top block: rewrite scroll handler without jQuery.

Rewrites js/scroll-to-top.js as vanilla JS using once + dataset + classList + getBoundingClientRect, addEventListener with passive: true and requestAnimationFrame. The click handler uses window.scrollTo({ top: 0, behavior }) where behavior follows window.matchMedia('(prefers-reduced-motion: reduce)'), so users who opt into reduced motion no longer see the animated scroll.

Drops the deprecated easing and duration config fields together with the conditional core/jquery.ui.effects.core library attach. The two settings were the duration and easing arguments to jQuery's animate(); native window.scrollTo({ behavior: 'smooth' }) does not expose either. A post_update strips both keys from existing block configs.

Renames the rendered HTML data attributes from snake_case to kebab-case (data-offset_opacity -> data-offset-opacity, data-position_fixed_disable_element -> data-position-fixed-disable-element) so the JS can read them as link.dataset.offsetOpacity etc. Small backwards-incompatible change for any external code reading these attribute names directly.

Closes the jQuery dependency item from #3107481 and covers the JS modernization portion of #3333020.

Closes #3333020

Merge request reports

Loading
Loading