Companionway in H&W terms always referred to a stairway but I have known several people to also consider it a corridor or enclosed passageway. As perhaps a point of interest a companion hatch is a cover over the top of the staircase, usually closed in heavy weather, can be wood but usually of steel construction. Likewise a companion hatchway is the term for this opening in the deck. Finally for several years the wooden ladder used for the Pilot was termed the companion ladder however Pilot ladder is the more common term used today. It possibly was known as the companion ladder because the Pilot may have been considered as a "companion" to accompany the ship as she entered or left port.
It was like that when I got here