Kids are a lot more curious than we think they are. I remember when I was around 7 or so I specifically went looking around my parents closets to find anything "cool". My find was a CO2 BB Gun which looked like a 9mm Luger. It was unlocked and unloaded, and was just laying on the dresser. I thank God for the gun not being real.
Now, as far as children racking a shotgun slide, it is very well possible. After checking my shotgun, I let my 9 yr old sister try and rack the slide of my Wingmaster. She did it with ease, and even liked the sound of the slide racking.
After knowing that, I used what Edward advised. Let the child know that they can only see the gun when I am around. All they have to do is ask me. It'll relieve a lot of the mystery about firearms. I taught my sisters about gun safety using BB guns: How to treat them with respect, safe gun handling, how to check for bullets etc...
Recently, My dad and I took my two little sisters to watch us shoot skeet. My 10 yr old (the one that was 9 in the story earlier) sister has been showing interest in the shooting sport for a while now. The next lane over a father was teaching his 10 yr old daughter to shoot also.
Conclusion:
I now always wish my dad taught me about gun safety. It was something I had to learn on my own. I learned everything all wrong before, I wasn't really aware of the keep your finger off the trigger etc when I was young. But I picked it up when I was 12 and shot an M-16 along w/ a variety of other firearms w/ my uncles in Indiana. I finally had some sort of guidance towards proper gun handling, and I'm thankful for it now.
I didn't want my sisters to go through the same mistake I wen through. My dad isnt much of a firearm fan, although he has shot when he was young and now shoots skeet/trap w/ me. Therefore, I try my best to keep my younger sisters interested in the sport as safely as I can.
Teach them young, and teach them well.