Getting user input from inside a while loop?

I'm new to BASH and i'm trying to create a script which is simply put a large find and replace file. This is what I have so far

N=0
while read LINE ; do

N=$\(\(N\+1\)\)

sed  's/'$2'/'$3'/g' $LINE > .temp
echo "Changes to file $N = $LINE"
echo 'The following changes will be made will be made to $LINE :' 
diff .temp $LINE
echo 'Are you sure you want to make these changes? y/
readline  a

if   [[ $a == "N" || $a == "n"  || $a == "No" || $a == "no" ]]; then
    echo "No changes have been made to $LINE"
    rm .tempfr

elif [[ $a == "Y" || $a == "y" || $a == "Yes" || $a == "yes" ]];  then
   
    mv .tempfr $LINE
    echo "The given changes have been made successfully"
   
else
    echo $a "is not a recognized input.  Please use y/n"
  
fi 
rm .temp

done < $1

For this code the $1 is a file which is simply a list of files which need to be searched with this find and remove script. $2 is the word that i'm looking to find and $3 is the word i'm looking to replace it with. The problem that I seem to be having is that every time that I run this script it seems to skip the

read a

line, and assumes that the user put in no input. I'm worried that this has something to do with using two read commands but I don't exactly know what the problem would be. Does anyone know why it isn't allowing me to ask for user input from inside this while loop?

echo 'Are you sure you want to make these changes? y/n '
read  -sn1 a < $(tty)

As loops are executed in a subshell, they can't read from the same stdin as the script is executed.

I'm afraid I don't fully understand. I see the logic in attaching the -sn1 to the read file. That makes it accept y, Y, yes, Yes, n, N, no, and No without having to go through the whole if or statement that I wrote. But I don't know what the -a < $(tty) does. and I don't see how it would help me deal with the stdin issue.
Do you know of a way I could write my code to get around that?

sorry, 'a' is not part of read options: it's not '-a', it's ' a' your variable's name.

I've edited my post to correct my typo.

Specific tty is not needed actually, /dev/tty should do

well, how?
As I can launch a script from /dev/pts/'any munber', or a real /dev/tty'any number', how else could you determine what "tty" should give the input?