mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-25 02:58:56 +01:00
feat(selectBox): enhance separator handling and update focus ring behavior
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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}`;
|
||||
|
||||
Reference in New Issue
Block a user