added delay option, fixed tests, added role attribute to template popover