Accessible ramps and ramp landings require edge protection to prevent users from slipping off of the ramped surface.
TAS 4.8.7 Edge Protection. Ramps and landings with drop-offs shall have curbs, walls, railings, or projecting surfaces that prevent people from slipping off the ramp. Curbs shall be a minimum of 2 in (50 mm) high (see Fig. 17).
Accessible routes with slopes of 5% or less are not considered ramps and do not require edge protection even if there is a drop off.
Also, curb ramps do not require edge protection.
Remember, these standards are only a minimum requirement. If you have a sidewalk with a drop-off that you believe could be a hazard, some sort of barrier may be advised. Just be sure that you don’t create a trip hazard.
And, the building code will usually require guards when you have a drop-off greater than 30″.