Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shorten Settings editor aria labels #153625

Merged
merged 1 commit into from Jun 29, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -290,21 +290,21 @@ export function getIndicatorsLabelAriaLabel(element: SettingsTreeSettingElement,
// Add sync ignored text
const ignoredSettings = getIgnoredSettings(getDefaultIgnoredSettings(), configurationService);
if (ignoredSettings.includes(element.setting.key)) {
ariaLabelSections.push(localize('syncIgnoredTitle', "This setting is ignored during sync"));
ariaLabelSections.push(localize('syncIgnoredAriaLabel', "Setting ignored during sync"));
}

// Add default override indicator text
const sourceToDisplay = getDefaultValueSourceToDisplay(element);
if (sourceToDisplay !== undefined) {
ariaLabelSections.push(localize('defaultOverriddenDetails', "Default setting value overridden by {0}", sourceToDisplay));
ariaLabelSections.push(localize('defaultOverriddenDetailsAriaLabel', "{0} overrides the default value", sourceToDisplay));
}

// Add text about default values being overridden in other languages
const otherLanguageOverridesStart = localize('defaultOverriddenListPreface', "The default value of the setting has also been overridden for the following languages:");
const otherLanguageOverridesList = element.overriddenDefaultsLanguageList
.map(language => languageService.getLanguageName(language)).join(', ');
if (element.overriddenDefaultsLanguageList.length) {
ariaLabelSections.push(`${otherLanguageOverridesStart} ${otherLanguageOverridesList}`);
const otherLanguageOverridesText = localize('defaultOverriddenLanguagesList', "Language-specific default values exist for {0}", otherLanguageOverridesList);
rzhao271 marked this conversation as resolved.
Show resolved Hide resolved
ariaLabelSections.push(otherLanguageOverridesText);
}

const ariaLabel = ariaLabelSections.join('. ');
Expand Down