Accessory buildings as part of principal buildings. Accessory buildings may be erected as part of a principal building, provided that all yard requirements of this chapter are complied with for the principal building, including the attached accessory building.