<h3 id="<%= question.title.parameterize %>"><%= question.title %></h3>
<table id="question_<%= question.id %>_results_table">
  <% if question.accepts_options? %>
    <thead>
      <tr>
        <%- question.question_options.each do |option| %>
          <th scope="col" class="<%= option_styles(option) %>">
            <% if most_voted_option?(option) %>
              <span class="show-for-sr"><%= t("polls.show.results.most_voted_answer") %></span>
            <% end %>
            <%= option.title %>
          </th>
        <% end %>
      </tr>
    </thead>
    <tbody>
      <tr>
        <%- question.question_options.each do |option| %>
          <td class="<%= option_styles(option) %>">
            <%= option.total_votes %>
            (<%= option.total_votes_percentage.round(2) %>%)
          </td>
        <% end %>
      </tr>
    </tbody>
  <% else %>
    <thead>
      <tr>
        <th scope="col"><%= t("polls.show.results.open_ended.valid") %></th>
        <th scope="col"><%= t("polls.show.results.open_ended.blank") %></th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td>
          <%= question.open_ended_valid_answers_count %>
          (<%= question.open_ended_valid_percentage.round(2) %>%)
        </td>
        <td>
          <%= question.open_ended_blank_answers_count %>
          (<%= question.open_ended_blank_percentage.round(2) %>%)
        </td>
      </tr>
    </tbody>
  <% end %>
</table>
