mirror of
https://github.com/Microsoft/vscode
synced 2024-10-13 06:48:17 +00:00
Accessibility. Fix Microsoft/monaco-editor#506 , document role should have title per w3c documentation.
This commit is contained in:
parent
19e4249d93
commit
31aba00493
|
@ -299,6 +299,8 @@ class AccessibilityHelpWidget extends Widget implements IOverlayWidget {
|
||||||
text += '\n\n' + nls.localize("outroMsg", "You can dismiss this tooltip and return to the editor by pressing Escape or Shift+Escape.");
|
text += '\n\n' + nls.localize("outroMsg", "You can dismiss this tooltip and return to the editor by pressing Escape or Shift+Escape.");
|
||||||
|
|
||||||
this._contentDomNode.domNode.appendChild(renderFormattedText(text));
|
this._contentDomNode.domNode.appendChild(renderFormattedText(text));
|
||||||
|
// Per https://www.w3.org/TR/wai-aria/roles#document, Authors SHOULD provide a title or label for documents
|
||||||
|
this._contentDomNode.domNode.setAttribute('aria-label', text);
|
||||||
}
|
}
|
||||||
|
|
||||||
public hide(): void {
|
public hide(): void {
|
||||||
|
|
|
@ -253,6 +253,8 @@ class AccessibilityHelpWidget extends Widget implements IOverlayWidget {
|
||||||
text += '\n\n' + nls.localize('outroMsg', "You can dismiss this tooltip and return to the editor by pressing Escape or Shift+Escape.");
|
text += '\n\n' + nls.localize('outroMsg', "You can dismiss this tooltip and return to the editor by pressing Escape or Shift+Escape.");
|
||||||
|
|
||||||
this._contentDomNode.domNode.appendChild(renderFormattedText(text));
|
this._contentDomNode.domNode.appendChild(renderFormattedText(text));
|
||||||
|
// Per https://www.w3.org/TR/wai-aria/roles#document, Authors SHOULD provide a title or label for documents
|
||||||
|
this._contentDomNode.domNode.setAttribute('aria-label', text);
|
||||||
}
|
}
|
||||||
|
|
||||||
public hide(): void {
|
public hide(): void {
|
||||||
|
|
Loading…
Reference in a new issue