mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -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({
|
@Component({
|
||||||
selector: 'modelview-hyperlink',
|
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 {
|
export default class HyperlinkComponent extends TitledComponent<azdata.HyperlinkComponentProperties> implements IComponent, OnDestroy, AfterViewInit {
|
||||||
@Input() descriptor: IComponentDescriptor;
|
@Input() descriptor: IComponentDescriptor;
|
||||||
@@ -73,6 +73,10 @@ export default class HyperlinkComponent extends TitledComponent<azdata.Hyperlink
|
|||||||
return this.getPropertyOrDefault<boolean>((props) => props.showLinkIcon, false);
|
return this.getPropertyOrDefault<boolean>((props) => props.showLinkIcon, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public getDisplayedTitle(): string {
|
||||||
|
return this.title || this.url || '';
|
||||||
|
}
|
||||||
|
|
||||||
public onClick(e: MouseEvent): void {
|
public onClick(e: MouseEvent): void {
|
||||||
this.fireEvent({
|
this.fireEvent({
|
||||||
eventType: ComponentEventType.onDidClick,
|
eventType: ComponentEventType.onDidClick,
|
||||||
|
|||||||
@@ -76,9 +76,11 @@ body.web {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* {{SQL CARBON EDIT}} Underline links
|
||||||
.monaco-workbench a {
|
.monaco-workbench a {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
.monaco-workbench a:active {
|
.monaco-workbench a:active {
|
||||||
color: inherit;
|
color: inherit;
|
||||||
|
|||||||
Reference in New Issue
Block a user