govspeak 6.5.8 → 6.5.9

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: 26ef4d3bfb3ed9dcf07d44a1428e815928a4fa1ee94f388de829bb999b3cd79c
4
- data.tar.gz: c2982f083911dcaf38a0883d48e9ca302a3b514b7bc05b99b827830c02db884d
3
+ metadata.gz: 948aced50c3d3842255ea4206a651229de59b2beef42e0c50e55e204354d9b5f
4
+ data.tar.gz: cc55abe4b54b112a3aa1cb350a94270b11b9f0c11a5ca71479f55bb0efbf657d
5
5
  SHA512:
6
- metadata.gz: f75532f9905ae86df812be38a837d60abe1007cad72e8d886c95019f2563734a9e136368b74c1d1499d41bc8c83b2c3a41f415128c93c7025c4f4aacb9765e6f
7
- data.tar.gz: e6ef52ca611f2b3e74e77a3330ddaf602385eb90685b3839c8bd28f4bdf06c21652c50cff4a85fc2b157e8e009e11c5ce9c7c439a92d5abdf78821725fbaba2c
6
+ metadata.gz: 1e0c1b0d6ca1fe4999e4135536328ecdc60bd34f368d986a808cee6de687f58198a080c19beffd47df6d80130edd2010eb1a09ccd840ea8adb9375c0b747e533
7
+ data.tar.gz: e47aeeabecc4ffccff7342d1a1ad2e1ddd6cd8aabf5850f740fa3bf5ecdd9395bbded84222d55a5c8998748d7491a649793c550ab49564cd098486623684b275
@@ -1,3 +1,7 @@
1
+ ## 6.5.9
2
+
3
+ * Adjust footnote markup to accommodate multiple references (PR#198)
4
+
1
5
  ## 6.5.8
2
6
 
3
7
  * Customise footnote markup for accessibility (PR#192)
@@ -126,7 +126,8 @@ module Govspeak
126
126
  el.content = "[footnote #{footnote_number}]"
127
127
  end
128
128
  document.css("[role='doc-backlink']").map do |el|
129
- el.content = "[go to where this is referenced]"
129
+ backlink_number = " " + el.css("sup")[0].content if el.css("sup")[0].present?
130
+ el["aria-label"] = "go to where this is referenced#{backlink_number}"
130
131
  end
131
132
  end
132
133
 
@@ -1,3 +1,3 @@
1
1
  module Govspeak
2
- VERSION = "6.5.8".freeze
2
+ VERSION = "6.5.9".freeze
3
3
  end
@@ -11,21 +11,36 @@ class GovspeakFootnoteTest < Minitest::Test
11
11
 
12
12
  Footnotes can be added too[^2].
13
13
 
14
- [^2]: And then later defined too." do
15
- assert_html_output '
14
+ [^2]: And then later defined too.
15
+
16
+ This footnote has a reference number[^3].
17
+
18
+ And this footnote has the same reference number[^3].
19
+
20
+ [^3]: And then they both point here." do
21
+ assert_html_output(
22
+ %(
16
23
  <p>Footnotes can be added<sup id="fnref:1" role="doc-noteref"><a href="#fn:1" class="footnote">[footnote 1]</a></sup>.</p>
17
24
 
18
25
  <p>Footnotes can be added too<sup id="fnref:2" role="doc-noteref"><a href="#fn:2" class="footnote">[footnote 2]</a></sup>.</p>
19
26
 
27
+ <p>This footnote has a reference number<sup id="fnref:3" role="doc-noteref"><a href="#fn:3" class="footnote">[footnote 3]</a></sup>.</p>
28
+
29
+ <p>And this footnote has the same reference number<sup id="fnref:3:1" role="doc-noteref"><a href="#fn:3" class="footnote">[footnote 3]</a></sup>.</p>
30
+
20
31
  <div class="footnotes" role="doc-endnotes">
21
32
  <ol>
22
33
  <li id="fn:1" role="doc-endnote">
23
- <p>And then later defined. <a href="#fnref:1" class="reversefootnote" role="doc-backlink">[go to where this is referenced]</a></p>
34
+ <p>And then later defined. <a href="#fnref:1" class="reversefootnote" role="doc-backlink" aria-label="go to where this is referenced">↩</a></p>
24
35
  </li>
25
36
  <li id="fn:2" role="doc-endnote">
26
- <p>And then later defined too. <a href="#fnref:2" class="reversefootnote" role="doc-backlink">[go to where this is referenced]</a></p>
37
+ <p>And then later defined too. <a href="#fnref:2" class="reversefootnote" role="doc-backlink" aria-label="go to where this is referenced">↩</a></p>
38
+ </li>
39
+ <li id="fn:3" role="doc-endnote">
40
+ <p>And then they both point here. <a href="#fnref:3" class="reversefootnote" role="doc-backlink" aria-label="go to where this is referenced">↩</a> <a href="#fnref:3:1" class="reversefootnote" role="doc-backlink" aria-label="go to where this is referenced 2">↩<sup>2</sup></a></p>
27
41
  </li>
28
42
  </ol>
29
- </div>'
43
+ </div>),
44
+ )
30
45
  end
31
46
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govspeak
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.5.8
4
+ version: 6.5.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - GOV.UK Dev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-05 00:00:00.000000000 Z
11
+ date: 2020-11-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionview
@@ -378,24 +378,24 @@ signing_key:
378
378
  specification_version: 4
379
379
  summary: Markup language for single domain
380
380
  test_files:
381
- - test/govspeak_footnote_test.rb
382
- - test/html_sanitizer_test.rb
383
- - test/govspeak_test.rb
384
- - test/test_helper.rb
385
- - test/blockquote_extra_quote_remover_test.rb
386
- - test/govspeak_button_test.rb
387
- - test/html_validator_test.rb
381
+ - test/govspeak_images_bang_test.rb
382
+ - test/govspeak_attachment_test.rb
388
383
  - test/govspeak_link_extractor_test.rb
389
- - test/govspeak_attachment_link_test.rb
390
- - test/govspeak_link_test.rb
391
- - test/govspeak_contacts_test.rb
384
+ - test/govspeak_attachments_inline_test.rb
385
+ - test/govspeak_button_test.rb
392
386
  - test/govspeak_structured_headers_test.rb
393
- - test/govspeak_images_test.rb
387
+ - test/govspeak_attachments_image_test.rb
388
+ - test/govspeak_attachment_link_test.rb
394
389
  - test/govspeak_extract_contact_content_ids_test.rb
395
- - test/govspeak_table_with_headers_test.rb
396
- - test/govspeak_attachment_test.rb
397
- - test/govspeak_attachments_inline_test.rb
398
390
  - test/presenters/h_card_presenter_test.rb
391
+ - test/govspeak_test.rb
392
+ - test/html_sanitizer_test.rb
393
+ - test/govspeak_footnote_test.rb
394
+ - test/blockquote_extra_quote_remover_test.rb
395
+ - test/test_helper.rb
396
+ - test/govspeak_table_with_headers_test.rb
397
+ - test/govspeak_images_test.rb
398
+ - test/govspeak_link_test.rb
399
+ - test/html_validator_test.rb
400
+ - test/govspeak_contacts_test.rb
399
401
  - test/govspeak_test_helper.rb
400
- - test/govspeak_images_bang_test.rb
401
- - test/govspeak_attachments_image_test.rb