Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: a11y issues on partner request screens #4102

Merged
merged 1 commit into from
Feb 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion app/views/partners/family_requests/_list.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,9 @@
<%= check_box_tag "child-#{child.id}", child.active, child.active,
class: "custom-control-input",
id: "child-#{child.id}" %>
<label class="custom-control-label" for="child-<%= child.id %>"></label>
<label class="custom-control-label" for="child-<%= child.id %>">
<span class="sr-only">Include This Child?</span>
</label>
<% end %>
</div>
</td>
Expand Down
2 changes: 1 addition & 1 deletion app/views/partners/family_requests/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
) %>
</div>
<div class="col-3">
<%= f.label :search_comments, "Show Active Only?" %>
<%= f.label :search_active, "Show Active Only?" %>
<%= f.check_box(
:search_active,
class: 'filterrific-periodically-observed form-control'
Expand Down
10 changes: 8 additions & 2 deletions app/views/partners/individuals_requests/_item_request.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
<%= form.fields_for(:items) do |field| %>
<tr>
<td><%= field.input :item_id, collection: @formatted_requestable_items, label: false, allow_blank: true, class: 'form-control' %></td>
<td><%= field.number_field :person_count, as: :integer, label: false, step: 1, min: 1, class: 'form-control' %></td>
<td>
<%= field.label :item_id, "Item Requested", {class: 'sr-only'} %>
<%= field.input :item_id, collection: @formatted_requestable_items, label: false, allow_blank: true, class: 'form-control' %>
</td>
<td>
<%= field.label :person_count, "Number of Individuals", {class: 'sr-only'} %>
<%= field.number_field :person_count, as: :integer, label: false, step: 1, min: 1, class: 'form-control' %>
</td>
<td><%= remove_item_button "Remove" %></td>
</tr>
<% end %>
1 change: 0 additions & 1 deletion app/views/partners/individuals_requests/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
<tr>
<th>Item Requested</th>
<th>Number of Individuals</th>
<th></th>
</tr>
</thead>

Expand Down
10 changes: 8 additions & 2 deletions app/views/partners/requests/_item_request.html.erb
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
<%= form.fields_for :item_requests, defined?(object) ? object : nil do |field| %>
<tr>
<td><%= field.select :item_id, @formatted_requestable_items, {include_blank: 'Select an item'}, {class: 'form-control'} %></td>
<td><%= field.number_field :quantity, label: false, step: 1, min: 1, class: 'form-control' %></td>
<td>
<%= field.label :item_id, "Item Requested", {class: 'sr-only'} %>
<%= field.select :item_id, @formatted_requestable_items, {include_blank: 'Select an item'}, {class: 'form-control'} %>
</td>
<td>
<%= field.label :quantity, "Quantity", {class: 'sr-only'} %>
<%= field.number_field :quantity, label: false, step: 1, min: 1, class: 'form-control' %>
</td>
<td>
<%= field.hidden_field :_destroy, as: :hidden %>
<%= remove_item_button "Remove", soft: true %>
Expand Down
1 change: 0 additions & 1 deletion app/views/partners/requests/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
<tr>
<th>Item Requested</th>
<th>Quantity</th>
<th></th>
</tr>
</thead>
<tbody class='fields'>
Expand Down
Loading