Those kinds of URL are fine in principle. It's common to have URLs like that that are links to specific parts of your page. Google takes no notice of your JS, anyway, just your HTML, so it's not an SEO issue.
The bigger issue is that those links will be dead with JS off, and that's a shame. It would be better to construct the accordion in such a way that you don't have dead links like that in the HTML. The content should be accessible even with JS off.