Skip to content

Commit 256d8ab

Browse files
babadanialmichaelroudnitski
andauthoredMar 3, 2025
fix: accessibility errors reported by IBM Equal Access Accessibility Checker (#64)
* Fix accessibility errors reported by IBM Equal Access Accessibility Checker * Update ruby version, rebundle --------- Co-authored-by: Michael Roudnitski <mroudnitski@ibm.com>
1 parent 2fe9f07 commit 256d8ab

7 files changed

+11
-10
lines changed
 

‎.github/workflows/rspec-tests.yml

-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ jobs:
2222
- name: Set up Ruby
2323
uses: ruby/setup-ruby@v1
2424
with:
25-
ruby-version: 3.2
2625
bundler-cache: true
2726
- name: Setup Database
2827
env:

‎.tool-versions

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ruby 3.3.6
1+
ruby 3.4.2

‎Gemfile.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
sn_filterable (3.0.0)
4+
sn_filterable (3.1.0)
55
heroicon (~> 1)
66
kaminari (~> 1)
77
tailwindcss-rails (~> 3)

‎app/components/sn_filterable/category_component.html.erb

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<%= content_tag :fieldset,
22
class: "w-full text-xs lg:text-sm app-word-break dark:bg-gray-800",
33
"x-data": { open: @open }.to_json do %>
4+
<legend><%= @title %></legend>
45
<button class="flex border-b dark:border-gray-700 justify-between w-full px-4 py-3 font-medium text-left text-gray-900 dark:text-white transition-colors hover:bg-gray-200 dark:hover:bg-gray-700 rounded-sm focus:outline-none focus-visible:ring focus-visible:ring-gray-500 dark:focus-visible:ring-gray-400 focus-visible:ring-opacity-75"
56
type="button"
67
@click="open = !open">

‎app/components/sn_filterable/chips_component.html.erb

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
"@click": "$event.preventDefault(); onClick()" do %>
2121
<span class="sr-only">Remove filter for Objects</span>
2222
<svg class="h-2 w-2" stroke="currentColor" fill="none" viewBox="0 0 8 8">
23+
<title>Remove filter for Objects</title>
2324
<path stroke-linecap="round" stroke-width="1.5" d="M1 1l6 6m0-6L1 7" />
2425
</svg>
2526
<% end %>

‎app/components/sn_filterable/filter_category_component.html.erb

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
<% @filter[:filters].each_with_index do |sub_filter, index| %>
22
<div class="relative flex items-start px-4 transition-colors hover:bg-gray-200 dark:hover:bg-gray-700 text-gray-700 dark:text-gray-300 hover:text-gray-900 dark:hover:text-white">
3-
<div class="min-w-0 flex-1 flex-grow">
4-
<%= content_tag :label,
5-
sub_filter[:name],
6-
class: "block py-2 pr-4 text-gray-600 dark:text-gray-400 select-none w-full cursor-pointer",
7-
for: "filter-#{@filter[:filter_name]}-#{index}" %>
8-
</div>
93
<div class="my-2 flex items-center">
104
<% if @filter[:multi] %>
115
<%= content_tag :input, "",
@@ -31,5 +25,11 @@
3125
%>
3226
<% end %>
3327
</div>
28+
<div class="min-w-0 flex-1 flex-grow">
29+
<%= content_tag :label,
30+
sub_filter[:name],
31+
class: "block py-2 pr-4 text-gray-600 dark:text-gray-400 select-none w-full cursor-pointer",
32+
for: "filter-#{@filter[:filter_name]}-#{index}" %>
33+
</div>
3434
</div>
3535
<% end %>

‎app/components/sn_filterable/main_component.html.erb

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
<%= heroicon "x-mark", variant: :outline, options: { class: "h-6 w-6 text-grey-500 dark:text-gray-400" } %>
3535
</button>
3636
</div>
37-
<div name="Filter Options" role="menu" aria-orientation="vertical" aria-labelledby="options-menu" class="overflow-y-auto max-h-full">
37+
<div name="Filter Options" role="menu" aria-orientation="vertical" aria-label="options-menu" class="overflow-y-auto max-h-full">
3838
<% @filters.each do |filter| %>
3939
<%= render SnFilterable::CategoryComponent.new(title: filter[:title], open: @filtered.queries.dig("filter", filter.try(:[], :filter_name)).present?) do |c| %>
4040
<% c.with_filter(filtered: @filtered, filter: filter) %>

0 commit comments

Comments
 (0)