Current:
<div id="toc" class="toc">
<div id="toctitle">
<h2>Contents</h2>
<span class="toctoggle">...</span>
</div>
<ul>...</ul>
</div>A heading and list is pretty good, but I usually see this inside a semantic <nav> or <div role="navigation"> these days, so it can be jumped to as a landmark/region as well. For example, the ToC of the WAI-ARIA recommendation itself. This will be even more useful after T114072 makes sections into regions. Something like this might do the trick:
<div role="navigation" aria-labelledby="tocheading" id="toc" class="toc">
<div id="toctitle">
<h2 id="tocheading">Contents</h2>
<span class="toctoggle">...</span>
</div>
<ul>...</ul>
</div>