add custom data attributes to block from block configuration page
You will need to create a custom block using hook block info, hook block view and hook block configure. That last hook will let you as a form render array (see drupal form api).

The custom block system in drupal 7 isn't very good. If you need anything but the simplest HTML code then you should create your own blocks using the above hooks.