shorter barrels will cause a loss in velocity and therefore a loss in accuracy, at least in the case of the .308 cartridge.
Brian is correct. Velocity isn't accuracy. Sometimes its a deterrent to accuracy.
You mentioned the 308. The Army learned a long time ago, the most accurate velocity for the 308 in International Rifle Shooting was right at 2200 fps.
This velocity was increased for gas guns (match ammo as in the M14) to 2550, not to increase accuracy but to work the action.
Longer barrels do offer a benefit in target rifles where the use of iron sights are used. Not because the added velocity is needed but because the longer barrel gives you a longer sight radius, and the longer sight radius, the more accurate you can shoot the rifle.
The Mann accuracy devise the Army uses to test 308 (7.62) ammo is a 1903a3 action with an 18 inch barrel.
Velocity also comes in when hunting. For example you max hunting range you expect to shoot a given critter needs a certain about of KE to make a humane kill.
My granddaughter did a science project a few years ago, (I have posted the results before) where she was showing the shortest barrel one could have on a 308 using a 180 Gr Remington Core Lock bullet to make it convenient handling yet keep KE to about 1800 ft lbs. for elk hunting.
She cut a 26 inch barrel two inches at a time to 16 inches checking the velocity as she made the cuts.
Accuracy wasn't affected.