Having had a look at the doc [1]: "classes" is the option name, and
valid value (at initialization) is a json object, not a string
representation.
Try this instead:
options.set("classes", "{ 'ui-accordion': 'my-style' }");
Note that the string here will be interpreted as a json object (same
as if you provide a function name)
In the debugger, you should see this:
jQuery('#accordion2').accordion({ "heightStyle": "content", "classes":
{ 'ui-accordion': 'my-style' }, ....
In the inspector, you should see this:
div id="accordion2" class="ui-accordion my-style ui-widget
ui-helper-reset" role="tablist"
[1]
https://api.jqueryui.com/accordion/#option-classes