Skip to content

Commit

Permalink
Add view with accesibility label on top of floating toolbar (#20267)
Browse files Browse the repository at this point in the history
  • Loading branch information
dratwas committed Feb 18, 2020
1 parent bdb7349 commit 015555f
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions packages/block-editor/src/components/block-list/block.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,27 +198,27 @@ class BlockListBlock extends Component {
);

return (
<>
{ isSelected && (
<FloatingToolbar>
<Toolbar passedStyle={ styles.toolbar }>
<ToolbarButton
title={ __( 'Navigate Up' ) }
onClick={ () =>
this.props.onSelect( parentId )
}
icon={ NavigateUpSVG }
/>
<View style={ styles.pipe } />
</Toolbar>
<Breadcrumbs clientId={ clientId } />
</FloatingToolbar>
) }
<TouchableWithoutFeedback
onPress={ this.onFocus }
accessible={ ! isSelected }
accessibilityRole={ 'button' }
>
<TouchableWithoutFeedback
onPress={ this.onFocus }
accessible={ ! isSelected }
accessibilityRole={ 'button' }
>
<View accessibilityLabel={ accessibilityLabel }>
{ isSelected && (
<FloatingToolbar>
<Toolbar passedStyle={ styles.toolbar }>
<ToolbarButton
title={ __( 'Navigate Up' ) }
onClick={ () =>
this.props.onSelect( parentId )
}
icon={ NavigateUpSVG }
/>
<View style={ styles.pipe } />
</Toolbar>
<Breadcrumbs clientId={ clientId } />
</FloatingToolbar>
) }
<View
pointerEvents={ isTouchable ? 'auto' : 'box-only' }
accessibilityLabel={ accessibilityLabel }
Expand All @@ -238,8 +238,8 @@ class BlockListBlock extends Component {
) }
</View>
</View>
</TouchableWithoutFeedback>
</>
</View>
</TouchableWithoutFeedback>
);
}
}
Expand Down

0 comments on commit 015555f

Please sign in to comment.