UNPKG

355 BPlain TextView Raw
1import * as ts from 'typescript';
2import { getAncestorNode } from '../JsxAttribute';
3
4/**
5 * @Returns the implicit role for a header tag.
6 */
7function getImplicitRoleForHeader(node: ts.Node): string {
8 return getAncestorNode(node, 'article') || getAncestorNode(node, 'section') ? undefined : 'banner';
9}
10
11export { getImplicitRoleForHeader as header };