We generally discourage the use of IDs elsewhere in our code, so we should remove this special case for ID inputs. In makes for confusing reading when put alongside class selectors:
widget1 = OO.ui.infuse( 'widget1' ); widget2 = OO.ui.infuse( $( '.widget2' ) );
instead this should be:
widget1 = OO.ui.infuse( $( '#widget1' ) ); widget2 = OO.ui.infuse( $( '.widget2' ) );