<section class="list" aria-labelledby='all-list-items-header' id='all-list-items'>
  <h4 id='all-list-items-header'>Items with tag "<%= tag.title %>"</h4>

  <table class='links-table'>
    <tbody>
      <% tag.tagged_documents.each do |list_item| %>
        <tr class='item'
            data-title='<%= list_item.title %>'
            data-base-path='<%= list_item.base_path %>'>

          <td class='title'>
            <%= raw list_item.title %>
          </td>

          <td class='base-path'>
            <%= raw list_item.base_path %>
          </td>

          <td class='removal-button'>
            <%= button_to '#',
              method: :delete,
              data: { toggle: 'tooltip' },
              title: 'Remove item from list',
              class: 'remove-button btn btn-xs btn-default' do %>
              <%= icon :remove %>
            <% end %>
          </td>
        </tr>
      <% end %>
    </tbody>
  </table>
</section>

<section class="list" aria-labelledby='all-list-items-header' id='all-list-items'>
  <h4 id='all-list-items-header'>Items with tag "<%= tag.title %>"</h4>

  <table class='links-table'>
    <tbody>
      <% tag.tagged_documents.each do |item| %>
        <tr class='item'
            data-title='<%= item.title %>'
            data-base-path='<%= item.base_path %>'>

          <td class='title'>
            <%= raw item.title %>
          </td>

          <td class='base-path'>
            <%= raw item.base_path %>
          </td>

          <td class='removal-button'>
            <%= button_to '#',
              method: :delete,
              data: { toggle: 'tooltip' },
              title: 'Remove item from list',
              class: 'remove-button btn btn-xs btn-default' do %>
              <%= icon :remove %>
            <% end %>
          </td>
        </tr>
      <% end %>
    </tbody>
  </table>
</section>

Rename list_item variable to item
Rename list_item variable to item

Rename for clarity - list_item is an actual domain type, so avoid it
as a name unless actually using that type.
