Skip to content

Commit

Permalink
Add a label to the batch actions form to make it a landmark
Browse files Browse the repository at this point in the history
For a form to be a landmark and be announced by screen readers, it needs
to have an associated accessible name [1].

> Using the <form> element will automatically communicate a section of
> content as a form landmark, if it is provided an accessible name.

[1] - https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/form_role

Closes #5274
  • Loading branch information
waiting-for-dev committed Aug 9, 2023
1 parent baf2dfc commit 9eeb58e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
</div>

<div class="<%= toolbar_classes %>" data-<%= stimulus_id %>-target="batchToolbar">
<%= form_tag '', id: batch_actions_form_id %>
<%= form_tag '', id: batch_actions_form_id, "aria-label" => t(".batch_actions") %>
<% @batch_actions.each do |batch_action| %>
<%= render_batch_action_button(batch_action) %>
<% end %>
Expand Down
1 change: 1 addition & 0 deletions admin/app/components/solidus_admin/ui/table/component.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ en:
filter: 'Filter'
search_placeholder: 'Search all %{resources}'
refine_search: 'Refine Search'
batch_actions: Batch actions
clear: Clear
cancel: Cancel

0 comments on commit 9eeb58e

Please sign in to comment.