@dlowan,
That's me... grace under pressure.
On the sidewalk, this brings up what I as a designer faced with this would do - something like a brick veneer and lights on the edge. Now, I'd probably invent some edging metal corner with various safety attributes.
Eighteen inches?? Forget what I just said -
never mind me, that is a danger to children, but so is over 7.5 inches as a generality. Railing....
I tripped (yes, yes, I did) at a restaurant in Venice, CA, home town, one of the first to yup up our once quite desolate area street that is now home of chic...
as usual, I wasn't hurt (famous last words). But I talked with them about it a day or so later (I'd had had a business on that street, wasn't hostile) re some kind of warning markings) and they said that legally, such marking could be an admission of danger/culpability, or some such words. I don't know how true that is by now, if it even was back then, say late eighties.
In my work life, I would do things like change brick patterning or align concrete to brick, and as all this stuff got more sophisticated, lighted steps and lights in steps.
Thinking, one big sidewalk with rail, move the lanes. But then other problems would ensue, big trucks..