Using IDs isn't a good idea because you can have multiple widgets on the screen (in the same sidebar or in different sidebars).