Bug/accessibility - Focus related issues (#6859)

* fix for https://github.com/microsoft/azuredatastudio/issues/6798

* fix for https://github.com/microsoft/azuredatastudio/issues/6851
This commit is contained in:
Udeesha Gautam
2019-08-22 10:29:27 -07:00
committed by GitHub
parent 09552c5f15
commit 854508e940
7 changed files with 40 additions and 8 deletions

View File

@@ -74,8 +74,8 @@ export default class RadioButtonComponent extends ComponentBase implements IComp
this._input.value = this.value;
this._input.label = this.label;
this._input.enabled = this.enabled;
this._input.checked = this.checked;
this.focused ? this._input.focus() : this._input.blur();
}
// CSS-bound properties
@@ -115,4 +115,12 @@ export default class RadioButtonComponent extends ComponentBase implements IComp
public set name(newValue: string) {
this.setPropertyFromUI<azdata.RadioButtonProperties, string>((properties, label) => { properties.name = label; }, newValue);
}
public get focused(): boolean {
return this.getPropertyOrDefault<azdata.RadioButtonProperties, boolean>((props) => props.focused, false);
}
public set focused(newValue: boolean) {
this.setPropertyFromUI<azdata.RadioButtonProperties, boolean>((properties, value) => { properties.focused = value; }, newValue);
}
}