Affordable to you or affordable to the locals? The yen has devalued a lot in the past decade or so, giving foreigners a lot more spending power in Japan and causing the current tourism boom and backlash.
Still affordable to locals. The yen has devalued, and the cost of mansions (condos) have gone up, but single family homes, small apartments, etc are still similarly priced to buy, and rent is generally stable. A major difference is that if you are OK with a tiny apartment, you can get one, and it'll be something you can pay.
You can definitely see affects of the poor economy lately (lots of pawn shops popping up, replacing expensive cafes/restaurants), but housing is still reasonable for now.
The weak yen has certainly made Japan feel much cheaper for foreign visitors in recent years. But even before that, the general price level was lower than in many Western cities.
Also, if you're trying to save money as a local, moving just 3–4 train stops away often makes a noticeable difference in rent or hotel prices.