capybara_accessibility_audit 0.1.0 → 0.1.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: c9d57dbd535b2d7c257f1dd19975788449178add55e5368aa3dec36ca7239612
4
- data.tar.gz: 0a5b06b7b534d613052590db1242ef6c1d28db0820fcea718588c297aebcbc0b
3
+ metadata.gz: a45b944f513fa6a1e5bea716098819d9005baacb78fda996ecd1d7fc94a3eda5
4
+ data.tar.gz: 892c0eeb76a1b2e8f7dea300da7276d92f869faa84c6618c37d1dcd2825a8f6c
5
5
  SHA512:
6
- metadata.gz: 6d143c9f23767f861bc58481e0bd2513285de60b8fae286153c269ff52c36da9cf2aeca9a834d15e629bcd12b8dd49d364aadd6a25b5fcebdc861e42090ca395
7
- data.tar.gz: 423c722319bcc0118f8ee87ca4927626a24f3a327f92469b8f8f1fb4540c4a871213bba05fd439d234fe49553057a3317094c8139ed8ebdfccb332bcba7f2563
6
+ metadata.gz: 36a36b9e23bc852ebcae0511d4af91d9f08063d9161667860a6e2932ac34b172b01b3e9a55502dedf6bf5a054f4d2862df3f6be9d1f6d271870911c61958a9e6
7
+ data.tar.gz: d584a87ea944b2e4d5cc5e58afa102ec902885ec0df91ed38a4ba171f49616a6026da0dc31bd583ffdea36c9ffd8621a8758e5328e4723ab77e9efbccf71175b
data/README.md CHANGED
@@ -1,7 +1,5 @@
1
1
  # CapybaraAccessibilityAudit
2
2
 
3
- :warning: This is pre-release software. :warning:
4
-
5
3
  Extend your Capybara-powered System Tests to automatically audit the page for
6
4
  WCAG Stardards-based accessibility violations.
7
5
 
@@ -210,9 +208,7 @@ end
210
208
  Add this line to your application's Gemfile:
211
209
 
212
210
  ```ruby
213
- gem "capybara_accessibility_audit",
214
- github: "thoughtbot/capybara_accessibility_audit",
215
- branch: "main"
211
+ gem "capybara_accessibility_audit"
216
212
  ```
217
213
 
218
214
  And then execute:
@@ -5,10 +5,24 @@ module CapybaraAccessibilityAudit
5
5
  module AuditSystemTestExtensions
6
6
  extend ActiveSupport::Concern
7
7
 
8
+ MODAL_METHODS =
9
+ if defined?(Capybara::Session::MODAL_METHODS)
10
+ Capybara::Session::MODAL_METHODS
11
+ else
12
+ %i[accept_alert accept_confirm accept_prompt dismiss_confirm dismiss_prompt]
13
+ end
14
+
8
15
  included do
9
16
  class_attribute :accessibility_audit_after_methods, default: Set.new
10
17
  class_attribute :accessibility_audit_enabled, default: true
11
18
  class_attribute :accessibility_audit_options, default: ActiveSupport::OrderedOptions.new
19
+
20
+ MODAL_METHODS.each do |method|
21
+ define_method method do |*arguments, **options, &block|
22
+ result = super(*arguments, **options) { skip_accessibility_audits(&block) }
23
+ result.tap { Auditor.new(self).audit!(method) }
24
+ end
25
+ end
12
26
  end
13
27
 
14
28
  class_methods do
@@ -1,3 +1,3 @@
1
1
  module CapybaraAccessibilityAudit
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capybara_accessibility_audit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Doyle
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-29 00:00:00.000000000 Z
11
+ date: 2023-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -104,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
104
104
  - !ruby/object:Gem::Version
105
105
  version: '0'
106
106
  requirements: []
107
- rubygems_version: 3.3.3
107
+ rubygems_version: 3.4.13
108
108
  signing_key:
109
109
  specification_version: 4
110
110
  summary: Accessibility tooling for Capybara