How to alter local tasks menu titles? How can I override link title in the local tasks menu?

I tried like this, but didn't work:

function mymodule_menu_local_tasks_alter(&amp;$data, $route_name) {
  // Override 'Revisions' label menu link
  $data['tabs'][0]['entity.node.version_history']['#link']['localized_options']['attributes']['title'] = t('View history');
}
I have had success with

$data['tabs'][0]['entity.node.canonical']['#link']['title'] = t('Overview');