Displaying custom taxonomy terms active trail

Maybe better to use wp_list_catergories.. codex: wp list categories

$args = array(
  'taxonomy'     => 'type',
  'orderby'      => 'name',
  'show_count'   => false,
  'pad_counts'   => false,
  'hierarchical' => true,
  'title_li'     => ''
);

<ul>
    <?php wp_list_categories( $args ); ?>
</ul>

and add to css:

.current-cat{
    background-color: #d86f08;
}