There's probably nothing wrong with wiget per se, it just shouldn't have its markup spliced in the middle of the text.
"Don't shove your entire widget right between the words. You'd inherit styles, match new selectors and bubble all your events up through the text just for the sake of binding a pair of (x, y) coordinates."