feat(selectBox): enhance separator handling and update focus ring behavior

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
mrleemurray
2026-02-25 15:19:32 +00:00
parent 40db213e28
commit 7f9ec73230
3 changed files with 10 additions and 2 deletions

View File

@@ -45,7 +45,7 @@
padding: 5px 6px;
}
/* Remove focus ring around the list */
/* Remove list-level focus ring — individual rows show their own focus indicators */
.monaco-select-box-dropdown-container > .select-box-dropdown-list-container .monaco-list:focus::before {
outline: 0 !important;
}

View File

@@ -75,6 +75,7 @@ class SelectListRenderer implements IListRenderer<ISelectOptionItem, ISelectList
// Separator option - show a CSS border instead of text characters
if (element.isSeparator) {
data.root.classList.add('option-separator');
data.root.classList.add('option-disabled');
} else {
data.root.classList.remove('option-separator');
}
@@ -738,6 +739,10 @@ export class SelectBoxList extends Disposable implements ISelectBoxDelegate, ILi
mouseSupport: false,
accessibilityProvider: {
getAriaLabel: element => {
if (element.isSeparator) {
return localize('selectBoxSeparator', "separator");
}
let label = element.text;
if (element.detail) {
label += `. ${element.detail}`;