وَمَنْ صَلَّى عَلَى ظَهْرِ الْكَعْبَةِ: جَازَتْ صَلَاتُهُ.
Translation: Whoever prays on the roof of the Kaaba has a valid prayer.
Zahr al-Ka‘ba means the roof. The ruling concerns validity; the absence of an elevated wall immediately ahead is not treated here as automatically invalidating prayer.
The legal nature of the qibla and the etiquette of respecting the Sacred House are separate questions.