With the two-way prepositions -- an, auf, hinter, in, neben, über, unter, vor, zwischen, entlang -- when action moves from one place to another place, they take accusative. When the action is all in a single place, they take dative. Here, the action -- running -- all occurs on one place, the street; so dative.
Here is a very silly video, with terrible German accents, illustrating the two-way prepositions: https://www.youtube.com/watch?v=XY9J8C2eKJg
We don't run on streets in English, we might run in the street (as opposed to the pavement/sidewalk) or along or across. The sentence needs to give the appropriate closest sense of the German, not a literal translation.
Edit: actually, checking this, the real problem is that Duo hasn't indicted that strasse means both road and street (a street is a road but a road is not a street). We might be on the road, idiomatic for travelling, but we typically only walk on the road when there is an implied alternative (you need to walk on the road as there is no pavement) otherwise we walk along it.
So Did you run on the road sounds less awkward. Another alternative might be "Did you run into the street?" As to a child who has nearly got themselves killed, but as I do not understand the subtleties of what the German could reasonably mean, it is hard to say whether this is reasonable.
The underlying vital point is that prepositions rarely map exactly from one language to another, as Duo essentially teaches by example, the examples need to be clear and accurate.
This is a good discussion for me, especially since I'm not an English native speaker.
Regarding the possibility of "Did you run into the street?", I understand that this cannot be the case because the German sentence has "der Straße". That is, it's in the dative case. Why?
Because, when the preposition "auf" is used with the dative case, it means that there's a fixed location or movement inside it - at least with verbs that indicate physical movement. So it will start an answer to the question "Wo?", and not "Wohin?" (movement towards some location). In our case, it means the person has walked/run in/on the street/road. Wo bist du gelaufen? Auf der Straße.
Here I copy from a discussion where this is explained:
Auf der Strasse gehen -> wo; Du benutzt die Strasse zum gehen (und nicht z.B. den Bürgersteig)
Auf die Strasse gehen -> wohin; man ist z.B. auf dem Bürgersteig und geht auf die Strasse, also vom Bürgersteig "zur" (auf die) Strasse (weil z.B. ein Hindernis auf dem Bürgerstreig den Weg versperrt).
Duo: "laufen means walk"
Also Duo: "laufen means run"
Does "laufen" actually mean to move on foot, without necessarily specifying whether it's by running or walking?
This is the kind of explanation that neither the Duolingo lesson system nor the discussion system are capable of efficiently handling.
I don't think the discussion pages are incapable of handling this efficiently (or timely). 20 minutes and you have your answer:
(transitive or intransitive) to walk; to jog; to run (to move on foot; either at a normal or an increased speed)
Also, from the usage notes there:
Some dictionaries define laufen as specifically meaning a medium pace between gehen (“to walk”) and rennen (“to run”). This was the original sense in Middle High German, which does remain common; the restriction to it, however, is contrary to long-established usage. Rather, laufen is neutral with regard to pace in modern German.