Skip to content

Commit

Permalink
Adding fieldset to address like named form inputs
Browse files Browse the repository at this point in the history
In consultation with @Dananji and following the [guidance of W3.org][1],
this commit wraps the forms (or controls) that render the
[add_buttom partial][2].  I don't believe that I have access to the
accessibility testing software, so this is a bit of a stab in the dark.

Note, in some cases I render the fieldset as a direct child of the form,
in other cases, I render the fieldset as a container for the table used
to present the elements that render the add button partial.

This relates to work done in #4160 to address #3966.

[1]:https://www.w3.org/WAI/tutorials/forms/grouping/
[2]:https://github.com/samvera/hyrax/blob/d5aa2f9ca802fe670687bb4f7c14ad242c1bacf6/app/views/hyrax/batch_select/_add_button.html.erb#L2
  • Loading branch information
jeremyf committed Oct 7, 2020
1 parent a09812c commit b152637
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions app/views/hyrax/collections/_default_group.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<fieldset>
<table class="table table-striped">
<caption class="sr-only"><%= t("hyrax.dashboard.my.sr.listing") %> <%= application_name %></caption>
<thead>
Expand All @@ -20,3 +21,4 @@
<% end %>
</tbody>
</table>
</fieldset>
2 changes: 2 additions & 0 deletions app/views/hyrax/dashboard/works/_default_group.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<fieldset>
<table class="table table-striped works-list">
<caption class="sr-only"><%= t("hyrax.dashboard.my.sr.listing") %> <%= application_name %></caption>
<thead>
Expand All @@ -18,3 +19,4 @@
<% end %>
</tbody>
</table>
</fieldset>
3 changes: 2 additions & 1 deletion app/views/hyrax/leases/_list_expired_active_leases.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
<% else %>
<%= form_tag leases_path, method: :patch do %>
<fieldset>
<%= submit_tag t('.deactivate_selected'), class: 'btn btn-primary' %>
<table class="leases table">
<thead>
Expand Down Expand Up @@ -49,5 +50,5 @@
</tbody>
</table>
<% end %>
</fieldset>
<% end %>
2 changes: 2 additions & 0 deletions app/views/hyrax/my/works/_default_group.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<fieldset>
<table class="table table-striped works-list">
<caption class="sr-only"><%= t("hyrax.dashboard.my.sr.listing") %> <%= application_name %></caption>
<thead>
Expand All @@ -16,3 +17,4 @@
<% end %>
</tbody>
</table>
</fieldset>

0 comments on commit b152637

Please sign in to comment.