erblint-github 0.5.0 → 0.5.1

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: 51575778a73a518df6f7741c5e0a05287423f7bbbe33881655facea2ef3f0c04
4
+ data.tar.gz: bbb1047dc9c931e1a8d3fc4529dcda5f235ec997e482ff52d4a2f50556f2c67c
5
5
  SHA512:
6
- metadata.gz: 4fde78f77bdbeda8d2c8831b629eb2b45d81a1a48c535d1ae962c2c3c5b01a1aa36ba8880ff912d38e6332331d2dfffa2128fb51820a2c041e746b9ae3af6501
7
- data.tar.gz: a30c11c3dad20f668f334f67b9278057b06b72cce181ec32d37b2aedb3916826ef71a6c518db62c29a0d54e97e2d76c0870dee956157f8ff370d834eb1a7380f
6
+ metadata.gz: dcec6b71362303b31cfe6f9073fdb77c7b4c90631611a91a9dfb8fb5584bcad93c2b5c82dc0a355e6570973d6232cac0632cf189d8d4eb092d150aa4d4540d9a
7
+ data.tar.gz: 5e7b54dd20908ddb31e6d551c4371ca3b13eafbaa6ab933766c5a50bdfade27180d29ceaf873e05db67ff73ab4677bec51dbdf031afd729b0efd164f222667af
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: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - GitHub Open Source
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-05 00:00:00.000000000 Z
11
+ date: 2023-10-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: erb_lint
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - '='
74
74
  - !ruby/object:Gem::Version
75
- version: 1.56.4
75
+ version: 1.57.1
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.57.1
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rubocop-github
85
85
  requirement: !ruby/object:Gem::Requirement