add title for color box (#19121)

This commit is contained in:
Alan Ren
2022-04-15 12:56:07 -07:00
committed by GitHub
parent 794daa3440
commit 5ec567a4f7
2 changed files with 2 additions and 1 deletions

View File

@@ -41,6 +41,7 @@ export class Colorbox extends Widget {
}
if (opts.label) {
this.domNode.setAttribute('aria-label', opts.label);
this.domNode.title = opts.label;
}
container.appendChild(this.domNode);

View File

@@ -193,7 +193,7 @@ export class ServerGroupDialog extends Modal {
const colorColorBox = new Colorbox(container, {
name: 'server-group-color',
class: ['server-group-color'],
label: `Colobox Color: ${color}`,
label: localize('serverGroup.colorValue', "Color: {0}", color),
});
this._register(colorColorBox.onSelect((viaKeyboard) => {