Per standard notation, an accidental applies to the given note in all octaves of that bar on that staff.
But this standard is not always followed to the letter. You almost -always- have all octaves on the note/staff/bar notated with the courtesy accidental and that courtesy accidental is NOT always surrounded by parenthesis.
I have researched this pretty hard. (I'm writing a program that renders standard notation given midi). If anyone knows differently, I'd appreciate your source.
Sorry, but I can't find any support for this notion as standard practice.
From Read, G. (1979). Music notation: A manual of modern practice
(2nd ed.). New York, NY: Taplinger Publishing:
"When an accidental not included in a key signature precedes any note, it affects the pitch it precedes--and no other
--for that one measure only
" (p. 129, author's italics).
From Heussenstamm, G. (1987). The Norton manual of music notation.
New York, NY: W. W. Norton:
"An accidental applies only to the note at its original pitch level
. When that note is sounded at a different octave level, another accidental is needed" (p. 69, author's italics).
From Gould, E. (2011). Behind bars: The definitive guide to music notation.
London, England: Faber Music:
"An accidental holds good for the duration of a bar. It applies only to the pitch at which it is writen: Each additional octave requires a further accidental" (p. 78).