It is people accused of crimes who are put in the dock as the Websters Dictionary makes clear:
- Main Entry: 6dock
- Function: noun
- Etymology: Dutch dial. (Flanders) docke cage
- Date: 1586
- : the place in a criminal court where a prisoner stands or sits during trial
— in the dock : on trial
Those giving evidence about being assaulted stand in the witness box.