You jest but that notification (it's been a thing on Android for at least 8 years, and on thinkpads for at least 10) has been very helpful to me. Sometimes the negotiation just fails and being told is helpful. Sometimes the charger lies about its specs and once again it's helpful to have a hint, rather than expect everybody to systematically have usb testers on hand.
With data speed I think it could be a little more complicated. Like OP was saying it would need access to some level of hardware information where it can see which pins are used by the cable. Since the connection 'speed' is still variable even when you DO have a supported cable.