Vehicles with antilock brakes may have a speed sensor built into the hub assembly. The sensor ring may move about as it rotates if there is a worn wheel hub bearing, which may trigger the appearance of an ABS warning light. Use a scanning tool that accesses your ABS to diagnose.
Meanwhile internal corrosion within the wheel assembly can send up a false alarm of worn parts. If your vehicle has a removable sensor, then simply remove and clean it. then add a zinc corrosion inhibitor to the hub before replacing. If the sensor is not removable, then the entire hub assembly will need to be replaced.

