New answers tagged accidentals
You retain the accidental. In this case, it is pretty unambiguous since the lead note is immediately preceding the note (baroque trills would even start with the upper note). If there is more of a distance to the preceding use of a changed pitch, one would lean towards adding a reminder accidental to the trill.
The rule you are citing only holds for chromatic figures. If you have changed keys, then you use accidentals that match the new key. If you are using a chromatic figure to move to the new key, then follow the rules for a chromatic figures until you finally arrive in the new key, where you then use accidentals that match the key. For example:
Top 50 recent answers are included