Dialog

Please don't create a new div to put inside the button.

Instead change this line and the two lines above it to be:

setElementText(no, cancel.title);

And do the same thing for the yes button.

The original code should not have been using text nodes in the first place.  (And it may be my fault... this code looks very familiar from 2012.)