mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-15 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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user