mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Accessibility fixes (#9516)
* add aria label for deploy plan table * shift focus to options dialog when opened * add check for when table is empty
This commit is contained in:
@@ -54,6 +54,7 @@ export const exportText = localize('dacFx.export', "Export");
|
|||||||
export const generateScript = localize('dacFx.generateScriptButton', "Generate Script");
|
export const generateScript = localize('dacFx.generateScriptButton', "Generate Script");
|
||||||
export const generatingScriptMessage = localize('dacfx.scriptGeneratingMessage', "You can view the status of script generation in the Tasks View once the wizard is closed. The generated script will open when complete.");
|
export const generatingScriptMessage = localize('dacfx.scriptGeneratingMessage', "You can view the status of script generation in the Tasks View once the wizard is closed. The generated script will open when complete.");
|
||||||
export const defaultText = localize('dacfx.default', "default");
|
export const defaultText = localize('dacfx.default', "default");
|
||||||
|
export const deployPlanTableTitle = localize('dacfx.deployPlanTableTitle', "Deploy plan operations");
|
||||||
|
|
||||||
// Error messages
|
// Error messages
|
||||||
export const databaseNameExistsErrorMessage = localize('dacfx.databaseNameExistsErrorMessage', "A database with the same name already exists on the instance of SQL Server");
|
export const databaseNameExistsErrorMessage = localize('dacfx.databaseNameExistsErrorMessage', "A database with the same name already exists on the instance of SQL Server");
|
||||||
|
|||||||
@@ -52,7 +52,9 @@ export class DeployPlanPage extends DacFxConfigPage {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async start(): Promise<boolean> {
|
async start(): Promise<boolean> {
|
||||||
this.table = this.view.modelBuilder.table().component();
|
this.table = this.view.modelBuilder.table().withProperties({
|
||||||
|
ariaLabel: loc.deployPlanTableTitle
|
||||||
|
}).component();
|
||||||
this.loader = this.view.modelBuilder.loadingComponent().withItem(this.table).component();
|
this.loader = this.view.modelBuilder.loadingComponent().withItem(this.table).component();
|
||||||
this.dataLossComponentGroup = await this.createDataLossComponents();
|
this.dataLossComponentGroup = await this.createDataLossComponents();
|
||||||
this.noDataLossTextComponent = await this.createNoDataLossText();
|
this.noDataLossTextComponent = await this.createNoDataLossText();
|
||||||
|
|||||||
@@ -292,6 +292,7 @@ export class SchemaCompareOptionsDialog {
|
|||||||
this.optionsFlexBuilder.addItem(this.descriptionHeading, { CSSStyles: { 'font-weight': 'bold', 'height': '30px' } });
|
this.optionsFlexBuilder.addItem(this.descriptionHeading, { CSSStyles: { 'font-weight': 'bold', 'height': '30px' } });
|
||||||
this.optionsFlexBuilder.addItem(this.descriptionText, { CSSStyles: { 'padding': '4px', 'margin-right': '10px', 'overflow': 'scroll', 'height': '10vh' } });
|
this.optionsFlexBuilder.addItem(this.descriptionText, { CSSStyles: { 'padding': '4px', 'margin-right': '10px', 'overflow': 'scroll', 'height': '10vh' } });
|
||||||
await view.initializeModel(this.optionsFlexBuilder);
|
await view.initializeModel(this.optionsFlexBuilder);
|
||||||
|
this.optionsTable.focus();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -315,6 +315,15 @@ export default class TableComponent extends ComponentBase implements IComponent,
|
|||||||
this._table.autosizeColumns();
|
this._table.autosizeColumns();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public focus(): void {
|
||||||
|
if (this._table.grid.getDataLength() > 0) {
|
||||||
|
if (!this._table.grid.getActiveCell()) {
|
||||||
|
this._table.grid.setActiveCell(0, 0);
|
||||||
|
}
|
||||||
|
this._table.grid.getActiveCellNode().focus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// CSS-bound properties
|
// CSS-bound properties
|
||||||
|
|
||||||
public get data(): any[][] {
|
public get data(): any[][] {
|
||||||
|
|||||||
Reference in New Issue
Block a user