erblint-github 0.5.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9f1a4a94379042a57da340419014484f8395304da4ba9e60427b1314208b65ce
4
- data.tar.gz: a2412a3fcc727db9d01441c2fdd4c24e7f3d472e0b55f73bb1c79a6839275ad6
3
+ metadata.gz: 3ef818ae184b77ba4ac63464eade43a7de6d2aef33b726bdf0418b898ae30cc2
4
+ data.tar.gz: 6343452d84a124559ac35e506cee624f2a576278ee459d8fc4748d4082688368
5
5
  SHA512:
6
- metadata.gz: 4fde78f77bdbeda8d2c8831b629eb2b45d81a1a48c535d1ae962c2c3c5b01a1aa36ba8880ff912d38e6332331d2dfffa2128fb51820a2c041e746b9ae3af6501
7
- data.tar.gz: a30c11c3dad20f668f334f67b9278057b06b72cce181ec32d37b2aedb3916826ef71a6c518db62c29a0d54e97e2d76c0870dee956157f8ff370d834eb1a7380f
6
+ metadata.gz: bd5a2bf532f635493d02c62ecd96e4ca11f73b06b56cbffd08ba4a925a79b811424d7149c15fb12a4a566ad92600bb2ac3c2c64a544f3acac7fcd0e76d71684b
7
+ data.tar.gz: ba62445efbc6575d016b09c7901c0e12e3cac7212ac8d0176030e5114bb7e321cfd50d62a0efcb7982bcbfe750e34dc0c6a7fb9090806127a626a5f34b5a60f3
data/README.md CHANGED
@@ -41,6 +41,7 @@ inherit_gem:
41
41
  - [GitHub::Accessibility::NoAriaLabelMisuse](./docs/rules/accessibility/no-aria-label-misuse.md)
42
42
  - [GitHub::Accessibility::NoPositiveTabIndex](./docs/rules/accessibility/no-positive-tab-index.md)
43
43
  - [GitHub::Accessibility::NoRedundantImageAlt](./docs/rules/accessibility/no-redundant-image-alt.md)
44
+ - [GitHub::Accessibility::NoVisuallyHiddenInteractiveElements](./docs/rules/accessibility/no-visually-hidden-interactive-elements.md)
44
45
  - [GitHub::Accessibility::NoTitleAttribute](./docs/rules/accessibility/no-title-attribute.md)
45
46
  - [GitHub::Accessibility::SvgHasAccessibleText](./docs/rules/accessibility/svg-has-accessible-text.md)
46
47
 
@@ -14,14 +14,10 @@ module ERBLint
14
14
  MESSAGE = "Avoid visually hidding interactive elements. Visually hiding interactive elements can be confusing to sighted keyboard users as it appears their focus has been lost when they navigate to the hidden element"
15
15
 
16
16
  def run(processed_source)
17
- visually_hidden = false
18
-
19
17
  tags(processed_source).each do |tag|
20
18
  next if tag.closing?
21
19
  classes = possible_attribute_values(tag, "class")
22
- visually_hidden = true if classes.include?("sr-only")
23
- next unless classes.include?("sr-only") || visually_hidden
24
- if INTERACTIVE_ELEMENTS.include?(tag.name)
20
+ if classes.include?("sr-only") && INTERACTIVE_ELEMENTS.include?(tag.name)
25
21
  generate_offense(self.class, processed_source, tag)
26
22
  end
27
23
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: erblint-github
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitHub Open Source
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-05 00:00:00.000000000 Z
11
+ date: 2024-02-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: erb_lint
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 5.20.0
33
+ version: 5.21.1
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 5.20.0
40
+ version: 5.21.1
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: mocha
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -58,28 +58,28 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 13.0.6
61
+ version: 13.1.0
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 13.0.6
68
+ version: 13.1.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rubocop
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - '='
74
74
  - !ruby/object:Gem::Version
75
- version: 1.56.4
75
+ version: 1.60.2
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - '='
81
81
  - !ruby/object:Gem::Version
82
- version: 1.56.4
82
+ version: 1.60.2
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rubocop-github
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -131,7 +131,7 @@ licenses:
131
131
  - MIT
132
132
  metadata:
133
133
  rubygems_mfa_required: 'true'
134
- post_install_message:
134
+ post_install_message:
135
135
  rdoc_options: []
136
136
  require_paths:
137
137
  - lib
@@ -139,15 +139,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
139
139
  requirements:
140
140
  - - ">="
141
141
  - !ruby/object:Gem::Version
142
- version: 2.7.0
142
+ version: 3.0.0
143
143
  required_rubygems_version: !ruby/object:Gem::Requirement
144
144
  requirements:
145
145
  - - ">="
146
146
  - !ruby/object:Gem::Version
147
147
  version: '0'
148
148
  requirements: []
149
- rubygems_version: 3.3.7
150
- signing_key:
149
+ rubygems_version: 3.4.10
150
+ signing_key:
151
151
  specification_version: 4
152
152
  summary: erblint GitHub
153
153
  test_files: []