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

use editMode:preview by default for screen reader users #182324

Merged
merged 2 commits into from
May 15, 2023
Merged

Conversation

meganrogge
Copy link
Contributor

No description provided.

@meganrogge meganrogge requested a review from jrieken May 12, 2023 16:46
@meganrogge meganrogge self-assigned this May 12, 2023
@meganrogge meganrogge added this to the May 2023 milestone May 12, 2023
Copy link
Member

@jrieken jrieken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a small nit about configuration service tricks

@@ -134,6 +136,17 @@ export class InteractiveEditorController implements IEditorContribution {
return INTERACTIVE_EDITOR_ID;
}

private _getMode(): EditMode {
let editMode: EditMode = this._configurationService.getValue('interactiveEditor.editMode');
const isDefault = editMode === EditMode.LivePreview;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better use IConfigurationService.inspect and look at IConfigurationValue#defaultValue and value. That avoid hardcoding the (current) default and it will account for the fact where users explicitly configure live preview to be their choice.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sample:

isCustomTitleFormat(): boolean {
const title = this.configurationService.inspect<string>(WindowSettingNames.title);
const titleSeparator = this.configurationService.inspect<string>(WindowSettingNames.titleSeparator);
return title.value !== title.defaultValue || titleSeparator.value !== titleSeparator.defaultValue;
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will create a follow up PR

@meganrogge meganrogge merged commit e14e406 into main May 15, 2023
5 checks passed
@meganrogge meganrogge deleted the merogge/acc-edit branch May 15, 2023 14:39
meganrogge added a commit that referenced this pull request May 15, 2023
use `editMode:preview` by default for screen reader users
@github-actions github-actions bot locked and limited conversation to collaborators Jun 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants