mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-18 09:35:39 -05:00
Fix link accessibilty issues (#16419)
* Fix link accessibilty issues * Move comment
This commit is contained in:
@@ -21,7 +21,7 @@ import { ILogService } from 'vs/platform/log/common/log';
|
||||
|
||||
@Component({
|
||||
selector: 'modelview-hyperlink',
|
||||
template: `<a [href]="url" [title]="title" [attr.aria-label]="ariaLabel" [attr.role]="ariaRole" target="blank" [ngStyle]="CSSStyles" [class]="cssClass">{{label}}</a>`
|
||||
template: `<a [href]="url" [title]="getDisplayedTitle()" [attr.aria-label]="ariaLabel" [attr.role]="ariaRole" target="blank" [ngStyle]="CSSStyles" [class]="cssClass">{{label}}</a>`
|
||||
})
|
||||
export default class HyperlinkComponent extends TitledComponent<azdata.HyperlinkComponentProperties> implements IComponent, OnDestroy, AfterViewInit {
|
||||
@Input() descriptor: IComponentDescriptor;
|
||||
@@ -73,6 +73,10 @@ export default class HyperlinkComponent extends TitledComponent<azdata.Hyperlink
|
||||
return this.getPropertyOrDefault<boolean>((props) => props.showLinkIcon, false);
|
||||
}
|
||||
|
||||
public getDisplayedTitle(): string {
|
||||
return this.title || this.url || '';
|
||||
}
|
||||
|
||||
public onClick(e: MouseEvent): void {
|
||||
this.fireEvent({
|
||||
eventType: ComponentEventType.onDidClick,
|
||||
|
||||
Reference in New Issue
Block a user