Viewing just the title attribute from a link not the link title as in the anchor text but the title next to a href in Drupal 8 twig

To further confuse thing, it’s the “Description” that’s put into the title="" spot, and Drupal claims “Shown when hovering over the menu link.”

Totally unmentioned in this documentation:

https://www.drupal.org/docs/8/theming-drupal-8/using-attributes-in-templates

It’s completely black-boxed here: https://api.drupal.org/api/drupal/core%21themes%21classy%21templates%21navigation%21links.html.twig/8.2.x

Can’t see much in here: https://api.drupal.org/api/drupal/core%21includes%21theme.inc/function/template_preprocess_links/8.2.x

setting a random attribute like ‘data-title’ worked fine here: http://www.plousia.com/how-add-title-data-attribute-menu-links-drupal-8-and-twig

          URL: {{ item.url }}
          Get it: {{ item.attributes.getAttribute('title') }}     
          Has it: {{ item.attributes.hasAttribute('title') }}     
          All? <div{{ item.attributes }}></div>
          Just the title? {{ item.attributes.title }}

The first one, the URL, works fine. The second and third ones print nothing at all. The div is printed, with no attributes at all.

The last one prints nothing at all, unless i change it to something that does apparently exist, but is empty, like {{ item.attributes.data-title }}, in which case it prints 0.

But I have the attribute name correct, because this works:

  {{ link(
    item.title,
    item.url,
    item.attributes.addClass(item_classes).setAttribute('title', 'go away')
  ) }}

That overrides the title attribute, and prints:

<a href="/search" title="go away" class="navbar-item" data-drupal-link-system-path="search"><span class="icon"><i class="fa fa-search"></i></span></a>

And do note, it does have titles the whole time already, i just cannot see them in any way except the fully rendered link and that is so frustrating and ridiculous.

But well, shouldn’t be using title attributes on menu links anyway…

Discourage use of duplicate Menu link title & Description in Menu Items https://www.drupal.org/project/drupal/issues/2145035

So, it’s working fine me checking by the URL:

{% for item in items %}
  {#
    A child template can pass in a set of link_classes, which replace the
    default navbar-item class.
  #}
  {%
   set item_classes = (link_classes ?? [])|merge([
     item.in_active_trail ? 'is-in-active-trail',
   ])
  %}
  {# Bulma supports only a single level of dropdowns. #}
  {% if item.below and menu_level == 0 %}
    <div class="navbar-item has-dropdown is-hoverable">
    {%
      set item_classes = item_classes|merge([
        'navbar-link',
      ])
    %}
  {% else %}
    {% if not link_classes %}
      {%
        set item_classes = item_classes|merge([
          'navbar-item',
        ])
      %}
    {% endif %}
    {% if item.url|render == '/search' %}
      {% set item_classes = item_classes|merge(['is-hidden-tablet']) %}
    {% endif %}
  {% endif %}
  {{ link(
    item.title,
    item.url,
    item.attributes.addClass(item_classes)
  ) }}
  {% if item.below and menu_level == 0 %}
    <div class="navbar-dropdown">
    {{ menus.menu_links(item.below, attributes, menu_level + 1, link_classes) }}
    </div>
  </div>
  {% endif %}
{% endfor %}

Oh, and do note