When placing the foot pedal controls (accelerator, brake and transmission) there are critical clearances that need to be maintained. If not, then the risks posed are many.
If the accelerator pedal is too close to the side wall then you risk the foot hitting the wall when sudden acceleration is needed. Same as if the accelerator were to close to the brake pedal. Either you hit the brake when meaning to accelerate or you accelerate when meaning to break.
Here is an image of a typical layout of pedals for an automatic transmission.

Notice the critical dimensions and how they are measured. To get the actual regulations you can contact the SAE organization.
Here is an image of a typical layout of pedals for an manual transmission.

Here you can see that once the clutch pedal is added there are a lot more considerations when it comes to the placement of all the pedals.