It varies from state to state. Last year (I think it was only last year) pedestrians always have the right of way in IL, whether they are in a crosswalk or not.
Illinois
Question
Who has the right of way at a crosswalk—pedestrians or cars?
Answer
It depends. Pedestrians
in a crosswalk have the right of way, so drivers must yield. Pedestrians not yet in a crosswalk should yield to drivers until it’s safe to enter the crosswalk.
Pedestrians
do not have an unlimited right to barge into a crosswalk whenever and however they like. They should wait until it’s safe.
Chapter 11 of the Illinois Vehicle Code is our official “Rules of the Road.” Article X of that chapter covers “Pedestrians’ Rights and Duties.”
Because cars can do more damage, they always have a general
duty to “exercise due care to avoid colliding with any pedestrian.” When the pedestrian is a “child or any obviously confused, incapacitated or intoxicated person,” due care bumps up to “proper precaution.”
Pedestrians have specific rights at crosswalks. Crosswalks can be at intersections of streets or “elsewhere.” At intersections, they can be marked or unmarked.
At an intersection, an unmarked crosswalk is basically the imaginary extension of a sidewalk across the street, even if the sidewalk doesn’t continue on the other side. That means an unmarked crosswalk requires some kind of sidewalk somewhere near the intersection.
Away from intersections “elsewhere”, crosswalks must be marked. That means: “distinctly indicated for pedestrian crossing by lines or other markings on the surface.”
At crosswalks with stoplights, cars and pedestrians must each obey their signal. If there’s no specific pedestrian signal, pedestrians can only enter a crosswalk when they have the green light.
At crosswalks with stop signs, cars must stop and yield to pedestrians as they would to other cars (i.e., to cars/pedestrians in the intersection).
Crosswalks with no stop light or sign are mostly going to be marked crosswalks in the middle of the block “elsewhere”. There, the law gets specific. Cars must yield to pedestrians actually
in that kind of crosswalk. And then, only to pedestrians on “the half of the roadway upon which the vehicle is traveling,” or “approaching so closely from the opposite half of the roadway as to be in danger.”
Then, the pedestrian has the right of way, and cars must
stop—not just slow down. When a car stops to yield that right of way, it’s illegal for other cars to pass.
So, in those middle-of-the block marked crosswalks, cars must stop for pedestrians in the crosswalk, on or close to the car’s half of the street. They
don't have to stop for pedestrians approaching or waiting at the curb.
That means pedestrians don’t have a right of way to enter the crosswalk, whenever they want. That’s specified in the law, which says that pedestrians shall not “suddenly leave a curb or other place of safety and walk or run into the path of a moving vehicle.”
The signs at those crosswalks often confuse things because they look like stop signs, but are really trying to communicate the idea that cars must yield to pedestrians
in the crosswalk. But it’s easy to think the red stop sign within the sign means stop, instead of yield.