提交 40fb74cf 编写于 作者: R Rob Lourens

Fix #52314 - add aria label for replace toggle state

上级 7c96862d
...@@ -241,6 +241,7 @@ export class SearchWidget extends Widget { ...@@ -241,6 +241,7 @@ export class SearchWidget extends Widget {
buttonHoverBackground: null buttonHoverBackground: null
}; };
this.toggleReplaceButton = this._register(new Button(parent, opts)); this.toggleReplaceButton = this._register(new Button(parent, opts));
this.toggleReplaceButton.element.setAttribute('aria-expanded', 'false');
this.toggleReplaceButton.icon = 'toggle-replace-button collapse'; this.toggleReplaceButton.icon = 'toggle-replace-button collapse';
// TODO@joh need to dispose this listener eventually // TODO@joh need to dispose this listener eventually
this.toggleReplaceButton.onDidClick(() => this.onToggleReplaceButton()); this.toggleReplaceButton.onDidClick(() => this.onToggleReplaceButton());
...@@ -330,6 +331,7 @@ export class SearchWidget extends Widget { ...@@ -330,6 +331,7 @@ export class SearchWidget extends Widget {
dom.toggleClass(this.replaceContainer, 'disabled'); dom.toggleClass(this.replaceContainer, 'disabled');
dom.toggleClass(this.toggleReplaceButton.element, 'collapse'); dom.toggleClass(this.toggleReplaceButton.element, 'collapse');
dom.toggleClass(this.toggleReplaceButton.element, 'expand'); dom.toggleClass(this.toggleReplaceButton.element, 'expand');
this.toggleReplaceButton.element.setAttribute('aria-expanded', this.isReplaceShown() ? 'true' : 'false');
this.updateReplaceActiveState(); this.updateReplaceActiveState();
this._onReplaceToggled.fire(); this._onReplaceToggled.fire();
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册