The four simple rules of firearm safety are easy to learn, remember, and follow. And the truly magnificent thing is that you have to break TWO of them to hurt someone. Breaking any single rule alone will not cause harm.
These kids, from reading the article, broke ALL four.
I suggest that this is not an "accidental" discharge, but a "negligent" one.
Rule 1: All guns are always loaded and should be treated as such. Even when you are absolutely 100% totally completely freaking positive that the firearm is unloaded, you treat it as if it were.
If you need a real-life story about why, go read this at Tam's place.
Rule 2: Never let the muzzle of the gun cover anything you don't want to shoot. Couple years back, at Epic Hog Hunt II, OldNFO was clearing one of his rifles when he had a slam-fire ND. You can read his write-up of the event here. The Cliff-Notes version: a .308 round from his SCAR went off about 3 feet from where we were sitting. Wanna know why nobody got hurt? Because he was mindful of Rule 2 and had the muzzle pointed at the Texas dirt (and Rule 1 and Rule 4).
Rule 3: Do not touch the trigger until you are ready to shoot. If you DO coon-finger the trigger without intending to send a round down range, bad things can happen to you or someone else. So don't.
Rule 4: Always know your target, what's in front of your target, and what's behind your target. You do know what's beyond your target, don't you? Don't you?
If you follow these Four Rules, you'll never shoot someone without intending to do so. If you break all four of 'em, you end up like the kids in the story at the top.
Safety isn't an accident. It's a habit.