Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion coral-component-shell/src/scripts/ShellMenuBarItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ class ShellMenuBarItem extends BaseComponent(HTMLElement) {
// providing aria-label will correctly pass it on to the shell menu button child element.
if (name === 'aria-label') {
if (value && this._elements.shellMenuButton.textContent.trim() === '') {
this._elements.shellMenuButton.setAttribute('aria-label', value);
this._elements.shellMenuButton.setAttribute('aria-label', this.title ? this.title : value);
}
} else {
super.attributeChangedCallback(name, oldValue, value);
Expand Down Expand Up @@ -418,6 +418,10 @@ class ShellMenuBarItem extends BaseComponent(HTMLElement) {
if (this.menu !== null) {
this.menu = this.menu;
}

if (this._elements.shellMenuButton.getElementsByTagName('coral-icon')[0]) {
this._elements.shellMenuButton.getElementsByTagName('coral-icon')[0].setAttribute('alt', this.title);
}
}

/**
Expand Down