mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-03 15:01:57 +01:00
react on comments
This commit is contained in:
@@ -651,6 +651,7 @@ export class List<T> implements ISpliceable<T>, IDisposable {
|
||||
if (options.ariaLabel) {
|
||||
this.view.domNode.setAttribute('aria-label', options.ariaLabel);
|
||||
}
|
||||
this.view.domNode.setAttribute('aria-setsize', this.length.toString());
|
||||
|
||||
this.style(options);
|
||||
}
|
||||
@@ -658,8 +659,8 @@ export class List<T> implements ISpliceable<T>, IDisposable {
|
||||
splice(start: number, deleteCount: number, elements: T[] = []): void {
|
||||
this.eventBufferer.bufferEvents(() => {
|
||||
this.spliceable.splice(start, deleteCount, elements);
|
||||
this.view.domNode.setAttribute('aria-setsize', this.length.toString());
|
||||
});
|
||||
this.view.domNode.setAttribute('aria-setsize', this.length.toString());
|
||||
}
|
||||
|
||||
get length(): number {
|
||||
@@ -715,7 +716,11 @@ export class List<T> implements ISpliceable<T>, IDisposable {
|
||||
setFocus(indexes: number[]): void {
|
||||
indexes = indexes.sort(numericSort);
|
||||
this.focus.set(indexes);
|
||||
this.view.domNode.setAttribute('aria-posinset', indexes.length ? (indexes[0] + 1).toString() : undefined);
|
||||
if (indexes.length) {
|
||||
this.view.domNode.setAttribute('aria-posinset', (indexes[0] + 1).toString());
|
||||
} else {
|
||||
this.view.domNode.removeAttribute('aria-posinset');
|
||||
}
|
||||
}
|
||||
|
||||
focusNext(n = 1, loop = false): void {
|
||||
|
||||
Reference in New Issue
Block a user