Skip to content

Commit

Permalink
fix: Skip som aria in this branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Magnus Ellinge committed Apr 2, 2019
1 parent 5d3ecae commit c67cd7d
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/tree-node/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,14 +91,10 @@ class TreeNode extends PureComponent {
const style = keepTreeOnSearch || !searchModeOn ? { paddingLeft: `${(_depth || 0) * 20}px` } : {}

const liId = `${_id}_li`
const leaf = isLeaf(_children)
const refSetter = ref => { this.node = ref }
const ariaExpanded = !leaf ? expanded === true : undefined
const ariaLevel = (_depth || 0) + 1

return (
<li className={liCx} style={style} {...getDataset(dataset)} id={liId} ref={refSetter} aria-expanded={ariaExpanded} aria-level={ariaLevel}>
<Toggle isLeaf={leaf} expanded={expanded} id={_id} onNodeToggle={onNodeToggle} />
<li className={liCx} style={style} {...getDataset(dataset)} id={liId}>
<Toggle isLeaf={isLeaf(_children)} expanded={expanded} id={_id} onNodeToggle={onNodeToggle} />
<NodeLabel
title={title}
label={label}
Expand Down

0 comments on commit c67cd7d

Please sign in to comment.