From 5ebd630b27b505faf63a7aba298c88ab0ec2f56e Mon Sep 17 00:00:00 2001 From: decabeza Date: Fri, 20 Oct 2017 18:35:03 +0200 Subject: [PATCH] adds answer most voted text for screen readers --- app/views/polls/results.html.erb | 7 ++++++- config/locales/en/general.yml | 2 ++ config/locales/es/general.yml | 2 ++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/app/views/polls/results.html.erb b/app/views/polls/results.html.erb index 697382ed2..884f341f7 100644 --- a/app/views/polls/results.html.erb +++ b/app/views/polls/results.html.erb @@ -22,7 +22,12 @@ <%- question.question_answers.each do |answer| %> - ><%= answer.title %> + > + <% if answer.most_voted %> + <%= t ("polls.show.results.most_voted_answer") %> + <% end %> + <%= answer.title %> + <% end %> diff --git a/config/locales/en/general.yml b/config/locales/en/general.yml index 6e4b9b662..586a90a45 100644 --- a/config/locales/en/general.yml +++ b/config/locales/en/general.yml @@ -513,6 +513,8 @@ en: valid: "Valid" white: "White votes" null_votes: "Invalid" + results: + most_voted_answer: "Most voted answer: " poll_questions: create_question: "Create question" show: diff --git a/config/locales/es/general.yml b/config/locales/es/general.yml index 2acbb540e..08fe25e1e 100644 --- a/config/locales/es/general.yml +++ b/config/locales/es/general.yml @@ -513,6 +513,8 @@ es: valid: "Válidos" white: "En blanco" null_votes: "Nulos" + results: + most_voted_answer: "Respuesta más votada: " poll_questions: create_question: "Crear pregunta para votación" show: