For those 9 voters it very well could have been motivated by racism. I cant say for sure but to completely leave him off the ballot seems fishy to me.
Hank Aaron (1982) 97.83%
Mickey Mantle (1974) 88.22%
Joe DiMaggio (1955 - 4th! Ballot) 88.84%
Sandy Koufax (1972) 86.87
Babe Ruth (1936) 95.13
Walter Johnson (1936) 83.62
Cy Young (1937 - 2nd ballot) 76.12
43 people didn't vote for Mickey Mantle.
28 people didn't vote for Joe DiMaggio (even on his 4th ballot).
52 people didn't vote for Sandy Koufax.
11 people didn't vote for Babe Ruth.
37 people didn't vote for Walter Johnson.
48 people didn't vote for Cy Young.
The very next year after Aaron (presumably most or all of the same voters), 1983, Brooks Robinson got in with 91.98%. 30 people didn't vote for him. Compare this to Aaron's 97.83% / 9 people.
From what I can tell, only 1 person ever got a unanimous vote - Mariano Rivera in 2019.
9 people total in history got in with a higher percentage of votes than Aaron - Seaver, Rivera, Ripken, Ichiro, Griffey Jr, Ryan, Cobb, Brett, Jeter. When Aaron was voted in it was only 1 - Cobb.
I could go on but it seems very unlikely racism played a part in Aaron not getting unanimously in considering all of the all time white players didn't get in unanimously either, and almost to a man got significantly less votes than Aaron.