It's almost correct, but misses the point in an annoying way that kind of ruins the example. What does work is something like the subset of the plane given by { (x, y) | x real, y rational } U { (0, y) | y real }. This is connected, because you can walk from any point (x,y) to any other point (x',y') by traveling horizontally to the Y axis at (0,y), vertically to (0,y'), then horizontally to (x',y'). But it isn't locally connected away from the Y axis because for a tiny enough open set S around a point (x,y), there are other points in S that you can't get to from (x,y) without leaving S.