a11y-lint 0.3.0 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c669543def8cb0173342e7399bebd99e9b51ae325e9a81323c3ee3cffe16b3b5
4
- data.tar.gz: 9e1822681da394ecc9246998a403f05bb09d928303c4282185600f02a6688fa5
3
+ metadata.gz: 5c000b195d8308dc83a3480df00e9a469e064535305ece969f779ee05b93fc87
4
+ data.tar.gz: cf3ec59befbf3057ff5f1a9d971925656fbf0f0c001e40780202abd862bd67a2
5
5
  SHA512:
6
- metadata.gz: 337c2cb2bbd729cc2f8fa14889cdb48aedbb83a0d755ecd294667a977a91055ad09f26ca14f180c56dbfdf67f158a40a81ef962b79dfcab4bf5df3e496bcf611
7
- data.tar.gz: c5a9ba84ff944b7750e2ac6d90d9d5ebfb5b460317d4b400f93869ff87e9a636ba6efdbd1c11357cc3e3c85fad1a25adc9b30ce8f00b910c4fc5710ec4526947
6
+ metadata.gz: ad3e23e799fce7418f9e28224a9ec63120f42d5a04bd27710637df12e278118728af0a3baf47c5fe8b3cfa2a12e6bfbc366d8f334a453b385111b1befc2828df
7
+ data.tar.gz: 8be4c61819523edcbb0a11bb4959ab5834b0552d0fe27be2fc71aa30362dc18eb5ca8f9d25bffa5578f7f77d0af11b5e1716e8429b4c2a865fcd3a243031ede0
data/CHANGELOG.md CHANGED
@@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.3.1] - 2026-03-27
11
+
12
+ ### Fixed
13
+
14
+ - `ImageTagMissingAlt` rule: detect `image_tag` nested inside `link_to` and other helper calls
15
+
10
16
  ## [0.3.0] - 2026-03-27
11
17
 
12
18
  ### Added
@@ -27,16 +27,22 @@ module A11y
27
27
  end
28
28
 
29
29
  def extract_image_tag_call(sexp)
30
- statement = sexp.dig(1, 0)
31
- return unless statement.is_a?(Array)
32
-
33
- case statement
34
- in [:command, [:@ident, "image_tag", *], *]
35
- statement
36
- in [:method_add_arg, [:fcall, [:@ident, "image_tag", *]], *]
37
- statement
38
- else
39
- nil
30
+ return unless sexp.is_a?(Array)
31
+ return sexp if image_tag_call?(sexp)
32
+
33
+ sexp.each do |child|
34
+ result = extract_image_tag_call(child)
35
+ return result if result
36
+ end
37
+
38
+ nil
39
+ end
40
+
41
+ def image_tag_call?(sexp)
42
+ case sexp
43
+ in [:command, [:@ident, "image_tag", *], *] then true
44
+ in [:method_add_arg, [:fcall, [:@ident, "image_tag", *]], *] then true
45
+ else false
40
46
  end
41
47
  end
42
48
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module A11y
4
4
  module Lint
5
- VERSION = "0.3.0"
5
+ VERSION = "0.3.1"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: a11y-lint
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Abdullah Hashim