From 5eeacc59a7415bbc1f8eaf5e0e74ed362439b154 Mon Sep 17 00:00:00 2001 From: Raymond Zhao <7199958+rzhao271@users.noreply.github.com> Date: Mon, 19 Jun 2023 14:26:12 -0700 Subject: [PATCH] Use status instead of alert (#185609) --- .../workbench/contrib/preferences/browser/settingsTree.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/vs/workbench/contrib/preferences/browser/settingsTree.ts b/src/vs/workbench/contrib/preferences/browser/settingsTree.ts index 68d8568c110..57649e4848a 100644 --- a/src/vs/workbench/contrib/preferences/browser/settingsTree.ts +++ b/src/vs/workbench/contrib/preferences/browser/settingsTree.ts @@ -6,7 +6,7 @@ import { BrowserFeatures } from 'vs/base/browser/canIUse'; import * as DOM from 'vs/base/browser/dom'; import { IMouseEvent } from 'vs/base/browser/mouseEvent'; -import { alert as ariaAlert } from 'vs/base/browser/ui/aria/aria'; +import * as aria from 'vs/base/browser/ui/aria/aria'; import { Button } from 'vs/base/browser/ui/button/button'; import { Toggle, unthemedToggleStyles } from 'vs/base/browser/ui/toggle/toggle'; import { IInputOptions, InputBox } from 'vs/base/browser/ui/inputbox/inputBox'; @@ -2074,7 +2074,7 @@ function renderValidations(dataElement: SettingsTreeSettingElement, template: IS template.validationErrorMessageElement.innerText = errMsg; const validationError = localize('validationError', "Validation Error."); template.inputBox.inputElement.parentElement!.setAttribute('aria-label', [validationError, errMsg].join(' ')); - if (!calledOnStartup) { ariaAlert(validationError + ' ' + errMsg); } + if (!calledOnStartup) { aria.status(validationError + ' ' + errMsg); } return true; } else { template.inputBox.inputElement.parentElement!.removeAttribute('aria-label'); @@ -2101,7 +2101,7 @@ function renderArrayValidations( template.validationErrorMessageElement.innerText = errMsg; const validationError = localize('validationError', "Validation Error."); template.containerElement.setAttribute('aria-label', [dataElement.setting.key, validationError, errMsg].join(' ')); - if (!calledOnStartup) { ariaAlert(validationError + ' ' + errMsg); } + if (!calledOnStartup) { aria.status(validationError + ' ' + errMsg); } return true; } else { template.containerElement.setAttribute('aria-label', dataElement.setting.key);