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:
Benjin Dubishar
2019-08-19 16:51:38 -07:00
committed by GitHub
parent 986ad33678
commit 77bf228809
5 changed files with 42 additions and 1 deletions

View File

@@ -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);
}
}