diff --git a/src/components/Tree/TreeTitle.tsx b/src/components/Tree/TreeTitle.tsx index 4ca4ac26cc..15a19828da 100644 --- a/src/components/Tree/TreeTitle.tsx +++ b/src/components/Tree/TreeTitle.tsx @@ -3,7 +3,6 @@ import * as PropTypes from 'prop-types' import * as React from 'react' import { UIComponent, childrenExist, createShorthandFactory } from '../../lib' -import { treeTitleBehavior } from '../../lib/accessibility' import { Accessibility } from '../../lib/accessibility/types' import { commonUIComponentPropTypes, @@ -52,7 +51,6 @@ class TreeTitle extends UIComponent { public static defaultProps = { as: 'a', href: '#', - accessibility: treeTitleBehavior as Accessibility, } handleClick = e => { diff --git a/src/lib/accessibility/Behaviors/Tree/treeTitleBehavior.ts b/src/lib/accessibility/Behaviors/Tree/treeTitleBehavior.ts deleted file mode 100644 index cf16611820..0000000000 --- a/src/lib/accessibility/Behaviors/Tree/treeTitleBehavior.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Accessibility } from '../../types' - -/** - * @specification - * Adds attribute 'aria-expanded=true' based on whether the folowing subtree is expanded or not. - */ -const treeTitleBehavior: Accessibility = (props: any) => ({ - attributes: { - root: { - role: 'treeitem', - ...(props.hasSubtree && { 'aria-expanded': props.open ? 'true' : 'false' }), - }, - }, -}) - -export default treeTitleBehavior diff --git a/src/lib/accessibility/index.ts b/src/lib/accessibility/index.ts index 0562467be6..fc8c7f4904 100644 --- a/src/lib/accessibility/index.ts +++ b/src/lib/accessibility/index.ts @@ -24,5 +24,4 @@ export { default as popupFocusTrapBehavior } from './Behaviors/Popup/popupFocusT export { default as chatBehavior } from './Behaviors/Chat/chatBehavior' export { default as chatMessageBehavior } from './Behaviors/Chat/chatMessageBehavior' export { default as gridBehavior } from './Behaviors/Grid/gridBehavior' -export { default as treeTitleBehavior } from './Behaviors/Tree/treeTitleBehavior' export { default as dialogBehavior } from './Behaviors/Dialog/dialogBehavior'