From b1ae9ff68f431be05e5d528e5ff98e953c3d6f63 Mon Sep 17 00:00:00 2001 From: Andrew Hosgood Date: Tue, 7 Jan 2025 16:24:45 +0000 Subject: [PATCH] Set aria-hidden and focusable attributes on presentational SVGs --- CHANGELOG.md | 3 +++ .../components/files-list/fixtures.json | 8 +++--- .../components/files-list/template.njk | 2 +- .../components/footer/fixtures.json | 6 ++--- .../components/footer/template.njk | 25 +++++++++---------- .../components/gallery/fixtures.json | 6 ++--- .../components/gallery/template.njk | 6 ++--- .../components/global-header/fixtures.json | 14 +++++------ .../components/global-header/template.njk | 8 +++--- .../components/header/fixtures.json | 2 +- .../components/header/template.njk | 2 +- .../components/pagination/fixtures.json | 10 ++++---- .../components/pagination/template.njk | 4 +-- src/nationalarchives/templates/fixtures.json | 10 ++++---- 14 files changed, 54 insertions(+), 52 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ae73b8d..bec25648 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Deprecated ### Removed ### Fixed + +- Set `aria-hidden="true"` and `focusable="false"` on presentational SVGs + ### Security ## [0.5.0](https://github.com/nationalarchives/tna-frontend/compare/v0.4.0...v0.5.0) - 2025-01-03 diff --git a/src/nationalarchives/components/files-list/fixtures.json b/src/nationalarchives/components/files-list/fixtures.json index 5bbcddb8..70faa6c5 100644 --- a/src/nationalarchives/components/files-list/fixtures.json +++ b/src/nationalarchives/components/files-list/fixtures.json @@ -33,7 +33,7 @@ } ] }, - "html": "
" + "html": "
" }, { "name": "fully clickable", @@ -52,7 +52,7 @@ ], "fullAreaClick": true }, - "html": "
" + "html": "
" }, { "name": "with classes", @@ -71,7 +71,7 @@ ], "classes": "files__test-class" }, - "html": "
" + "html": "
" }, { "name": "with attributes", @@ -92,7 +92,7 @@ "data-testattribute": "foobar" } }, - "html": "
" + "html": "
" } ] } diff --git a/src/nationalarchives/components/files-list/template.njk b/src/nationalarchives/components/files-list/template.njk index 46dc3341..9f269bb7 100644 --- a/src/nationalarchives/components/files-list/template.njk +++ b/src/nationalarchives/components/files-list/template.njk @@ -4,7 +4,7 @@ {%- endif -%} {%- set classes = containerClasses | join(' ') -%}
- +