govuk_tech_docs 2.0.5 → 2.0.6

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of govuk_tech_docs might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 54582060cbb5418946468de3ee6f0107a683bbbdb70d0829983650043a55789c
4
- data.tar.gz: 58249828f2d7b07ce75f7a7429c00084e20cb3af631d1416f8b9a43c2f82ea0a
3
+ metadata.gz: 3fc8ffc6ed311d6d660cb4a74861e65dac415ca396e47def8b9e6564cc58a6ed
4
+ data.tar.gz: 6d69b38114fe3853c7f3f3c379a87cdd50778563e885ba807503f0cb1af2025c
5
5
  SHA512:
6
- metadata.gz: 361ab74bdaa5363f0405384b0aa15a04b604ad4d871cbb87055ef877e16579934fe070389a4abd9fda45b2cf9fc7093fa1782afb4d50bd448af5372d964898e3
7
- data.tar.gz: 9bed0275d9a8757cf0ca3c8cf0dd672e152bae9844fc042223fd80479099cec18206e9be9313919e059b85586c1165a2bc6f08fa8ddbea3e74340ff54d2391f0
6
+ metadata.gz: 4e6127e6a526eb2d7683d29b5872101e6556c4df2d13ef45aaa5db26ac3ec4f06618bfec24a5966d6585d0f12806161600a4ab6bf9d79a8cf7736d27c287c795
7
+ data.tar.gz: bc119e8201e69cef00b2f6a97dc42f272f593c06ce8f1d82c055c38ff88650f2705d923d73dcdd1f980fcc3b08cbc5c277e143a2bc783a467498701fb6ba722d
data/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.0.6
4
+
5
+ This release contains accessibility fixes:
6
+
7
+ - anchor header links are now properly hidden to assistive technologies
8
+ - side navigation items now have consistent visible focus when tabbing between them
9
+ - side navigation items have unique Ids
10
+ - code elements now scale properly when you enlarge your text
11
+ - links with code elements now look correct
12
+ - contribution links are now within a landmark
13
+
14
+ You can look at the [2.0.6 milestone](https://github.com/alphagov/tech-docs-gem/milestone/2?closed=1) for the closed issues, and [pull request #129: Accessibility improvements](https://github.com/alphagov/tech-docs-gem/pull/129) for details on how these issues were fixed.
15
+
3
16
  ## 2.0.5
4
17
 
5
18
 
@@ -19,3 +19,5 @@ If you want slightly more control, you can always use <strong>HTML</strong>.
19
19
  For more detail and troubleshooting, take a look at the `README.md` file in the root of this project.
20
20
 
21
21
  <%= warning_text "Look out! A warning!" %>
22
+
23
+ <a href="#"><code>code element within a link</code></a>
@@ -0,0 +1,5 @@
1
+ ---
2
+ title: Another nested page
3
+ ---
4
+
5
+ # Another nested page
@@ -0,0 +1,5 @@
1
+ ---
2
+ title: Nested page
3
+ ---
4
+
5
+ # Nested page
@@ -11,7 +11,7 @@
11
11
  var $this = $(this)
12
12
  $this.addClass('anchored-heading')
13
13
  $this.prepend(
14
- '<a href="#' + $this.attr('id') + '" class="anchored-heading__icon" aria-hidden="true"></a>'
14
+ '<a href="#' + $this.attr('id') + '" class="anchored-heading__icon" aria-hidden="true" tabindex="-1"></a>'
15
15
  )
16
16
  }
17
17
  }
@@ -22,7 +22,7 @@
22
22
  var $topLevelItem = $($topLevelItems[i])
23
23
  var $heading = $topLevelItem.find('> a')
24
24
  var $listing = $topLevelItem.find('> ul')
25
- var id = 'toc-' + $heading.text().toLowerCase().replace(' ', '-')
25
+ var id = 'toc-' + $heading.text().toLowerCase().replace(/\s+/g, '-')
26
26
  // Only add collapsible functionality if there are children.
27
27
  if ($listing.length === 0) {
28
28
  continue
@@ -1,13 +1,10 @@
1
1
  .technical-documentation {
2
- @include govuk-font($size: 19);
2
+ @include govuk-font($size: 19, $line-height: 1.4);
3
3
  // Required for IE11 to render <main> correctly
4
4
  display: block;
5
5
  margin: govuk-spacing(3);
6
- font-size: 19px;
7
6
  max-width: 40em;
8
7
 
9
- line-height: 1.4;
10
-
11
8
  color: $govuk-text-colour;
12
9
 
13
10
  @include govuk-media-query(tablet) {
@@ -135,10 +132,12 @@
135
132
 
136
133
  font-family: monaco, Consolas, "Lucida Console", monospace;
137
134
  font-size: 15px;
135
+ font-size: 0.9375rem;
138
136
  color: $code-0E;
139
137
 
140
138
  @include govuk-media-query(tablet) {
141
139
  font-size: 16px;
140
+ font-size: 1rem;
142
141
  }
143
142
 
144
143
  // Handle long strings (URLs, long variable names, etc) by allowing them
@@ -163,6 +162,16 @@
163
162
  }
164
163
  }
165
164
 
165
+ // Ensure that if a code element is wrapped with a link that it renders correctly.
166
+ a code {
167
+ color: inherit;
168
+ }
169
+
170
+ a:focus code {
171
+ background: inherit;
172
+ color: inherit;
173
+ }
174
+
166
175
  .table-container {
167
176
  display: block;
168
177
  max-width: 100%;
@@ -63,7 +63,7 @@ module GovukTechDocs
63
63
  end
64
64
 
65
65
  if resource.children.any? && resource.url != home_url
66
- output += %{<ul><li><a href="#{resource.url}">#{resource.data.title}</a>\n}
66
+ output += %{<ul><li><a href="#{resource.url}"><span>#{resource.data.title}</span></a>\n}
67
67
  output += render_page_tree(resource.children, current_page, config, current_page_html)
68
68
  output += '</li></ul>'
69
69
  else
@@ -1,3 +1,3 @@
1
1
  module GovukTechDocs
2
- VERSION = "2.0.5".freeze
2
+ VERSION = "2.0.6".freeze
3
3
  end
@@ -62,13 +62,15 @@
62
62
  <%= partial "layouts/page_review" %>
63
63
  </main>
64
64
 
65
- <% if config[:tech_docs][:show_contribution_banner] %>
66
- <ul class="contribution-banner">
67
- <li><%= link_to "View source", source_urls.view_source_url %></li>
68
- <li><%= link_to "Report problem", source_urls.report_issue_url %></li>
69
- <li><%= link_to "GitHub Repo", source_urls.repo_url %></li>
70
- </ul>
71
- <% end %>
65
+ <aside>
66
+ <% if config[:tech_docs][:show_contribution_banner] %>
67
+ <ul class="contribution-banner">
68
+ <li><%= link_to "View source", source_urls.view_source_url %></li>
69
+ <li><%= link_to "Report problem", source_urls.report_issue_url %></li>
70
+ <li><%= link_to "GitHub Repo", source_urls.repo_url %></li>
71
+ </ul>
72
+ <% end %>
73
+ </aside>
72
74
 
73
75
  <%= partial "layouts/footer" %>
74
76
  </div>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: govuk_tech_docs
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.5
4
+ version: 2.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Government Digital Service
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-10-11 00:00:00.000000000 Z
11
+ date: 2019-10-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -364,6 +364,8 @@ files:
364
364
  - example/source/hidden-page.html.md
365
365
  - example/source/index.html.md.erb
366
366
  - example/source/javascripts/application.js
367
+ - example/source/nested-page/another-nested-page/index.html.md
368
+ - example/source/nested-page/index.html.md
367
369
  - example/source/not-expired-page.html.md
368
370
  - example/source/pets.yml
369
371
  - example/source/stylesheets/print.css.scss