提交 e8c9db13 编写于 作者: B Benjamin Pasero

fix aria role for expanded (do not use "undefined")

上级 8aa69c52
......@@ -215,7 +215,7 @@ export class ViewItem implements IViewItem {
this.element.removeAttribute('aria-labelledby');
}
if (this.model.hasChildren()) {
this.element.setAttribute('aria-expanded', String(this.model.isExpanded()));
this.element.setAttribute('aria-expanded', String(!!this.model.isExpanded()));
} else {
this.element.removeAttribute('aria-expanded');
}
......
......@@ -893,7 +893,7 @@ class SimpleButton extends Widget {
}
public setExpanded(expanded: boolean): void {
this._domNode.setAttribute('aria-expanded', String(expanded));
this._domNode.setAttribute('aria-expanded', String(!!expanded));
}
public toggleClass(className: string, shouldHaveIt: boolean): void {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册