What constitutes affordable housing?
1) Sold below market price.
2) Provided by employer as part of compensation.
3) Rental below-market with long lease.
How long the housing remains affordable depends on ownership. For No. 1, there are the interest rates on mortgages and the market value shift over time. Owners sometimes sell for capital gain and affordability ceases.
For No. 2, the term of employment may end and the employee has to move. But with a generous employer, a second employee may still be available for the lower rate.
For No. 3, the lease can be tempered to require an income audit limiting eligibility. This type of rental is provided by developers who are serious about providing affordability and finding real estate at lower values. The size of the project may contribute (with proper management). This last example resembles the Stonebridge apartments, which I was involved with 25 years ago. Stonebridge is still affordable.
To create affordable housing today, we need real estate at a lower cost and a group of generous investors who are immune to greed and willing to participate in building a large enough project for long-term rentals for low-income tenants. This can be done with sincere attitudes of some wealthy people.