In the past year, the availability of homes that a middle-class family could buy has declined in 86 percent of the largest metro areas, according to an analysis of 49 cities being released Wednesday by the real estate brokerage Redfin and provided in advance to The Associated Press.