From 4b10a2f08d14d1227bd44768ba68918d4cd01ed0 Mon Sep 17 00:00:00 2001 From: Henriette Dinger Date: Fri, 1 Apr 2016 15:01:19 +0200 Subject: [PATCH] Add fieldset for better accessibility with screenreader --- app/views/documents/index.html.erb | 38 +++++++++++++++++------------- 1 file changed, 21 insertions(+), 17 deletions(-) diff --git a/app/views/documents/index.html.erb b/app/views/documents/index.html.erb index c39e1d2d72..6bcafae811 100644 --- a/app/views/documents/index.html.erb +++ b/app/views/documents/index.html.erb @@ -52,24 +52,28 @@ See doc/COPYRIGHT.rdoc for more details. <% end %> <% content_for :sidebar do %> -

<%= l(:label_sort_by, '') %>

<%= form_tag({}, :method => :get, class: 'sidebar--document-sort') do %> -
-
-
- +
+ <%= l(:label_sort_by, '') %> +

+ <%= radio_button_tag 'sort_by', 'category', (@sort_by == 'category'), :onclick => 'this.form.submit();' %> +
+ <%= radio_button_tag 'sort_by', 'date', (@sort_by == 'date'), :onclick => 'this.form.submit();' %> +
+ <%= radio_button_tag 'sort_by', 'title', (@sort_by == 'title'), :onclick => 'this.form.submit();' %> +
+ <%= radio_button_tag 'sort_by', 'author', (@sort_by == 'author'), :onclick => 'this.form.submit();' %> + +

+
<% end %> <% end %>