not sure about the length but iMacs, Mac Minis, MacBooks, and Apple Displays (plus other displays) have USB ports nearby so you dont need an extra long USB cable.
e.g.
except for the Mac Pro which includes a USB cable extender (for customers who dont have a Display with USB ports).
same with the Apple mouse. you can just plug it into the side of the Apple keyboard or MacBook.