go ahead and take loose stop on the remaining eight-inch black wire and connect it to the black wire within the dimmer switch, employing a wire connector.
These under-cabinet lights may be low voltage or line voltage https://bookmarkswing.com/story19060049/facts-about-under-cabinet-lights-revealed