When it comes to Tax Deed, ALL liens get eliminated and no other dues can be collected -except government. The HOA can only charge prorated dues starting from the auction date, no other dues can be collected that includes special assessment and any other pre-auction debt. Keep in mind this is ONLY after a tax deed sale, on regular foreclosures is much different.
After doing tax deed sale surplus for 6 yrs., I do know that any HOA lien present at the time of the tax deed sale has 120 days from the sale date to file a claim in that specific county for any amount due. The tax deed sale overbid is held at county level for 120 days for this reason. Any lien claims (including Federal, HOA and municipal) will be deducted from the overbid before the prior owner can claim any residual amount from the overbid.
YES! It will clear the lien, but I do believe that any money owed that wasn't on the lien, they can still demand it once you take possession.