1 | // tslint:disable id-length
|
2 | import * as ts from 'typescript';
|
3 | import { getJsxAttributesFromJsxElement } from '../JsxAttribute';
|
4 |
|
5 | const hrefString: string = 'href';
|
6 |
|
7 | /**
|
8 | * @Returns the implicit role for an anchor tag.
|
9 | */
|
10 | function getImplicitRoleForAnchor(node: ts.Node): string {
|
11 | return getJsxAttributesFromJsxElement(node)[hrefString] ? 'link' : undefined;
|
12 | }
|
13 |
|
14 | export { getImplicitRoleForAnchor as a };
|