mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-27 01:25:36 -05:00
Improve narration for backup and dacpac UIs (#6783)
* Added ability to specify aria-rowcount and -colcount to tables. * Cleanup * Adds aria role to table container so that screen-readers ignore it
This commit is contained in:
@@ -217,6 +217,20 @@ export default class TableComponent extends ComponentBase implements IComponent,
|
||||
this.registerCheckboxPlugin(this._checkboxColumns[col]);
|
||||
}
|
||||
|
||||
if (this.ariaRowCount === -1) {
|
||||
this._table.removeAriaRowCount();
|
||||
}
|
||||
else {
|
||||
this._table.ariaRowCount = this.ariaRowCount;
|
||||
}
|
||||
|
||||
if (this.ariaColumnCount === -1) {
|
||||
this._table.removeAriaColumnCount();
|
||||
}
|
||||
else {
|
||||
this._table.ariaColumnCount = this.ariaColumnCount;
|
||||
}
|
||||
|
||||
this.layoutTable();
|
||||
this.validate();
|
||||
}
|
||||
@@ -291,4 +305,12 @@ export default class TableComponent extends ComponentBase implements IComponent,
|
||||
public get title() {
|
||||
return this.getPropertyOrDefault<azdata.TableComponentProperties, string>((props) => props.title, '');
|
||||
}
|
||||
|
||||
public get ariaRowCount(): number {
|
||||
return this.getPropertyOrDefault<azdata.TableComponentProperties, number>((props) => props.ariaRowCount, -1);
|
||||
}
|
||||
|
||||
public get ariaColumnCount(): number {
|
||||
return this.getPropertyOrDefault<azdata.TableComponentProperties, number>((props) => props.ariaColumnCount, -1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,6 +88,8 @@ export class FileBrowserDialog extends Modal {
|
||||
this._treeContainer = DOM.append(this._body, DOM.$('.tree-view'));
|
||||
|
||||
let tableContainer: HTMLElement = DOM.append(DOM.append(this._body, DOM.$('.option-section')), DOM.$('table.file-table-content'));
|
||||
tableContainer.setAttribute('role', 'presentation');
|
||||
|
||||
let pathLabel = localize('filebrowser.filepath', "Selected path");
|
||||
let pathBuilder = DialogHelper.appendRow(tableContainer, pathLabel, 'file-input-label', 'file-input-box');
|
||||
this._filePathInputBox = new InputBox(pathBuilder, this._contextViewService, {
|
||||
|
||||
Reference in New Issue
Block a user