From 3f9ba863a29035e58bcec03198c39224c1597a8a Mon Sep 17 00:00:00 2001 From: Alan Gabbianelli Date: Thu, 25 Feb 2021 16:27:50 +0000 Subject: [PATCH] Stop linking images to new tabs This fixes one of our [accessibility issues][1]. Specifically, it will prevent images to link to new tabs without telling the user, which fails [WCAG 2.1 success criterion 2.4.4 Link Purpose (in context)][2]. [1]: https://docs.google.com/spreadsheets/d/1s53eGMBj2hdTVLRitwi673R-_uERWh0kOxOp9QsOVg0 [2]: https://www.w3.org/TR/UNDERSTANDING-WCAG20/navigation-mechanisms-refs.html Trello card: https://trello.com/c/vv0OR35g/630-march-update-tech-docs-template --- CHANGELOG.md | 2 ++ lib/govuk_tech_docs/tech_docs_html_renderer.rb | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f407dad..992113a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## Unreleased +- [#210: Fix issue with WCAG 2.1 success criterion 1.3.1 (Info and Relationships)](https://github.com/alphagov/tech-docs-gem/pull/210) + ### Ruby version bump We've updated the Ruby version supported: diff --git a/lib/govuk_tech_docs/tech_docs_html_renderer.rb b/lib/govuk_tech_docs/tech_docs_html_renderer.rb index e2d4f236..a5805775 100644 --- a/lib/govuk_tech_docs/tech_docs_html_renderer.rb +++ b/lib/govuk_tech_docs/tech_docs_html_renderer.rb @@ -20,7 +20,7 @@ def header(text, level) end def image(link, *args) - %(#{super}) + %(#{super}) end def table(header, body)