How to add a click event to a text

Let 's say I have plot-react (CSR) (forked) - CodeSandbox example
How can I call the function after clicking on the Result or Speed (text)?

One possibility is to add an ariaDescription: "labels" then use D3 to select these elements and add a click event listener.