This paper provides a framework to look at the affordability both of the regular repayment of housing debt (an income constraint) and of the initial deposit (a budget constraint). Analysis of the microdata on Italian households in the period 2006-2012 indicates that the improved capability of households to maintain their mortgage repayments was counterbalanced by tighter budget constraints. The framework can be employed as a tool to assess the impact of macroprudential policies, such as caps on loan-to-value ratios (LTVs), on the pool of households who can access mortgage loans without running into financial distress: the level and the slope of the 'mortgage affordability curve', the curve that shows the share of eligible households at different LTVs provided by the banks, change over time and depend on the definition of household wealth. The 2008-09 crisis lowered the share of eligible families at high LTVs and slightly increased it at lower LTVs. Moreover, we find that mortgage capability worsened more for the middle class and that the decline in Italian LTVs across the period was mainly supply driven, whereas household preferences barely changed. Finally, alternative policies affecting mortgage affordability display heterogeneous effects both in increasing households' market participation and in fostering safer lending policies.