Supporting touch without device detection
Touch capability does not mean touch-only use. Convertible hardware and assistive tools make user-agent or screen-width assumptions an unreliable way to choose interaction behaviour.
Start with device-independent controls
Use native links, buttons and form controls with visible focus and adequate target size. Ensure the complete task works by keyboard before adding gesture shortcuts.
Avoid hover-only disclosure
Information and actions revealed on hover need an equivalent focus and activation path. A first tap should not unpredictably both reveal a control and follow its link.
Enhance from detected capability
Attach touch or pointer handling only where the browser exposes the required events, while retaining click and keyboard behaviour. Prevent duplicate activation carefully when touch generates subsequent mouse events.
Design for the interaction available at the moment, not for a permanent category assigned to the device.