Add text to a line in OmniGraffle

Solution 1:

Option + Double-click

Hold Option/ALT while double-clicking on the line to add a label to it.

If this maneuver instead creates a point to adjust the line from, double-click without Option/ALT. You can swap between Option/ALT-double-click (a) creating a point and (b) creating a label via a setting in Preferences → Drawing Tools → Line Editing.

Also, the documentation mentions clicking on the line while using the Text tool.