I don't think we should be adding classes to any of our stuff; who knows what sort of CSS selectors exist on the host page. If we really need a class, it should be super specific, like "OpenSeadragon-error" to make sure we don't collide with anything.

You're just using the modal-dialog class as a way to find it again later; better to store a list of them internally to the viewer and use that instead. I could see applying some sort of appropriately specific "error" class to aid in folks customizing the styling. I also agree that adding some sort of mechanism for people to override entirely would be good eventually (though probably too big a task for this patch).