Accessibility. Fix Microsoft/monaco-editor#506 , document role should have title per w3c documentation.

This commit is contained in:
rebornix 2017-07-12 13:53:51 -07:00
parent 19e4249d93
commit 31aba00493
2 changed files with 4 additions and 0 deletions

View file

@ -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.");
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 {

View file

@ -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.");
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 {