Adding buttons to the svg

A button cannot contain a div as only phrasing content is allowed (like a span).

You could have used a pseudo element and saved html mark up but I;m guessing you could probably have applied those styl;es to the parent anyway with a bit of fiddling around.