Variable Font Tester

Hello. I am trying to find a way to make sliders to modify various properties of a variable font. While the variable font can be affected by simple actions like hover (there’s a very simple code for this), when I try to link the element to a slider (by using the same widget ID), nothing at all happens.

Is it at all possible to make it work, or is there a better and more efficient way to go about this? Thanks in advance!