mirror of
https://github.com/Microsoft/vscode
synced 2024-09-18 01:58:27 +00:00
add accessibility setting tag (#163358)
This commit is contained in:
parent
f5ced8231b
commit
6f7820c454
|
@ -1183,6 +1183,7 @@ class EditorAccessibilitySupport extends BaseEditorOption<EditorOption.accessibi
|
|||
nls.localize('accessibilitySupport.off', "The editor will never be optimized for usage with a Screen Reader."),
|
||||
],
|
||||
default: 'auto',
|
||||
tags: ['accessibility'],
|
||||
description: nls.localize('accessibilitySupport', "Controls whether the editor should run in a mode where it is optimized for screen readers. Setting to on will disable word wrapping.")
|
||||
}
|
||||
);
|
||||
|
@ -4702,7 +4703,8 @@ export const EditorOptions = {
|
|||
accessibilitySupport: register(new EditorAccessibilitySupport()),
|
||||
accessibilityPageSize: register(new EditorIntOption(EditorOption.accessibilityPageSize, 'accessibilityPageSize', 10, 1, Constants.MAX_SAFE_SMALL_INTEGER,
|
||||
{
|
||||
description: nls.localize('accessibilityPageSize', "Controls the number of lines in the editor that can be read out by a screen reader at once. When we detect a screen reader we automatically set the default to be 500. Warning: this has a performance implication for numbers larger than the default.")
|
||||
description: nls.localize('accessibilityPageSize', "Controls the number of lines in the editor that can be read out by a screen reader at once. When we detect a screen reader we automatically set the default to be 500. Warning: this has a performance implication for numbers larger than the default."),
|
||||
tags: ['accessibility']
|
||||
})),
|
||||
ariaLabel: register(new EditorStringOption(
|
||||
EditorOption.ariaLabel, 'ariaLabel', nls.localize('editorViewAccessibleLabel', "Editor content")
|
||||
|
|
|
@ -448,6 +448,7 @@ const registry = Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Con
|
|||
localize('workbench.reduceMotion.auto', "Render with reduced motion based on OS configuration."),
|
||||
],
|
||||
default: 'auto',
|
||||
tags: ['accessibility'],
|
||||
enum: ['on', 'off', 'auto']
|
||||
},
|
||||
'workbench.layoutControl.enabled': {
|
||||
|
|
|
@ -29,27 +29,30 @@ const audioCueFeatureBase: IConfigurationPropertySchema = {
|
|||
localize('audioCues.enabled.on', "Enable audio cue."),
|
||||
localize('audioCues.enabled.off', "Disable audio cue.")
|
||||
],
|
||||
tags: ['accessibility']
|
||||
};
|
||||
|
||||
Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Configuration).registerConfiguration({
|
||||
'properties': {
|
||||
'audioCues.enabled': {
|
||||
markdownDeprecationMessage: 'Deprecated. Use the specific setting for each audio cue instead (`audioCues.*`).',
|
||||
tags: ['accessibility']
|
||||
},
|
||||
'audioCues.volume': {
|
||||
'description': localize('audioCues.volume', "The volume of the audio cues in percent (0-100)."),
|
||||
'type': 'number',
|
||||
'minimum': 0,
|
||||
'maximum': 100,
|
||||
'default': 70
|
||||
'default': 70,
|
||||
tags: ['accessibility']
|
||||
},
|
||||
'audioCues.lineHasBreakpoint': {
|
||||
'description': localize('audioCues.lineHasBreakpoint', "Plays a sound when the active line has a breakpoint."),
|
||||
...audioCueFeatureBase,
|
||||
...audioCueFeatureBase
|
||||
},
|
||||
'audioCues.lineHasInlineSuggestion': {
|
||||
'description': localize('audioCues.lineHasInlineSuggestion', "Plays a sound when the active line has an inline suggestion."),
|
||||
...audioCueFeatureBase,
|
||||
...audioCueFeatureBase
|
||||
},
|
||||
'audioCues.lineHasError': {
|
||||
'description': localize('audioCues.lineHasError', "Plays a sound when the active line has an error."),
|
||||
|
|
|
@ -422,6 +422,23 @@ class PreferencesActionsContribution extends Disposable implements IWorkbenchCon
|
|||
return accessor.get(IPreferencesService).openWorkspaceSettings(args);
|
||||
}
|
||||
});
|
||||
|
||||
registerAction2(class extends Action2 {
|
||||
constructor() {
|
||||
super({
|
||||
id: 'workbench.action.openAccessibilitySettings',
|
||||
title: { value: nls.localize('openAccessibilitySettings', "Open Accessibility Settings"), original: 'Open Accessibility Settings' },
|
||||
category,
|
||||
menu: {
|
||||
id: MenuId.CommandPalette,
|
||||
when: WorkbenchStateContext.notEqualsTo('empty')
|
||||
}
|
||||
});
|
||||
}
|
||||
async run(accessor: ServicesAccessor) {
|
||||
await accessor.get(IPreferencesService).openSettings({ jsonEditor: false, query: '@tag:accessibility' });
|
||||
}
|
||||
});
|
||||
registerAction2(class extends Action2 {
|
||||
constructor() {
|
||||
super({
|
||||
|
|
|
@ -114,6 +114,7 @@ export class SettingsEditor2 extends EditorPane {
|
|||
'@tag:sync',
|
||||
'@tag:usesOnlineServices',
|
||||
'@tag:telemetry',
|
||||
'@tag:accessibility',
|
||||
`@${ID_SETTING_TAG}`,
|
||||
`@${EXTENSION_SETTING_TAG}`,
|
||||
`@${FEATURE_SETTING_TAG}scm`,
|
||||
|
|
|
@ -186,7 +186,8 @@ const terminalConfiguration: IConfigurationNode = {
|
|||
[TerminalSettingId.MinimumContrastRatio]: {
|
||||
markdownDescription: localize('terminal.integrated.minimumContrastRatio', "When set, the foreground color of each cell will change to try meet the contrast ratio specified. Note that this will not apply to `powerline` characters per #146406. Example values:\n\n- 1: Do nothing and use the standard theme colors.\n- 4.5: [WCAG AA compliance (minimum)](https://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html) (default).\n- 7: [WCAG AAA compliance (enhanced)](https://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast7.html).\n- 21: White on black or black on white."),
|
||||
type: 'number',
|
||||
default: 4.5
|
||||
default: 4.5,
|
||||
tags: ['accessibility']
|
||||
},
|
||||
[TerminalSettingId.FastScrollSensitivity]: {
|
||||
markdownDescription: localize('terminal.integrated.fastScrollSensitivity', "Scrolling speed multiplier when pressing `Alt`."),
|
||||
|
|
|
@ -170,7 +170,8 @@ import product from 'vs/platform/product/common/product';
|
|||
'type': 'number',
|
||||
'default': 0,
|
||||
'description': localize('zoomLevel', "Adjust the zoom level of the window. The original size is 0 and each increment above (e.g. 1) or below (e.g. -1) represents zooming 20% larger or smaller. You can also enter decimals to adjust the zoom level with a finer granularity."),
|
||||
ignoreSync: true
|
||||
ignoreSync: true,
|
||||
tags: ['accessibility']
|
||||
},
|
||||
'window.newWindowDimensions': {
|
||||
'type': 'string',
|
||||
|
|
Loading…
Reference in a new issue