In Drupal 8, how do you add attributes to a link generated by the core Link field? (or, generally a render array with #type set to "link")
Answering my own question: the original suggestion was actually a valid solution; the way I had my theme configured meant that the hook wasn't loading. Stupid mistakes!