carbon-components-vue icon indicating copy to clipboard operation
carbon-components-vue copied to clipboard

Property in cv-header-menu component is missing which is used as attribute "title"

Open barbarahartel opened this issue 4 years ago • 3 comments

The cv-header-menu has a property called "title" but it is not used in the generated html element.

The generated element in the DOM tree looks like

  <li class="cv-header-menu bx--header__submenu">... </li>

But it should contain the attribute "title" like

<li class="cv-header-menu bx--header__submenu" id="userMenu" _**title="MyName"**_> ... </li>

barbarahartel avatar Jan 18 '21 14:01 barbarahartel

You are right 'title' was a poor choice and in general we have tried to avoid re-use of standard dom attributes.

It is used in

  • CvComboBox
  • CvDataTable
  • CvMultiSelect
  • CvHeaderMenu
  • CvToastNotification
  • CvInlineNotification

A suggested PR could add a new property Carbon uses 'menuLinkName' but re-uses title in other cases.

Perhaps switching use of title and subTitle for a value with some prefix e.g. 'the' or component name based.

props: {
  theTitle: String,
  title: String
},
computed: {
  componentTitle() {
    // used by UI
    return theTitle ? theTitle : title;
  },
  attrTitle() {
    // used by UI
    return theTitle ? title : null;
  }
}

lee-chase avatar Feb 06 '21 14:02 lee-chase

Does it mean that this will be fixed in the next fixpack?

barbarahartel avatar Feb 09 '21 08:02 barbarahartel

This issue has been marked as stale because it has required additional info or a response from the author for over 14 days. When you get the chance, please comment with the additional info requested. Otherwise, this issue will be closed in 14 days.

github-actions[bot] avatar Jun 20 '24 08:06 github-actions[bot]