Get proper block title from block object I have a block object in drupal 8 that I am trying to get the title of. I tried $block-&gt;label() and it seems to work for some block types, but not for Views blocks. On those, it returns the block's admin label, not the configured title.

If it matters, I am trying to find this information from hook_preprocess_region().
If you were using hook_preprocess_block() it would be much easier to get the title, you would simply load the block by its id and get the label from the returned block object like this:

function hook_preprocess_block(&amp;$variables) {
  $variables['new_title'] = \Drupal\block\Entity\Block::load($variables['elements']['#id'])-&gt;label();
}