From 6ae540cafdc7d4b51a76e85975ce4e3a7d31c998 Mon Sep 17 00:00:00 2001 From: Ali Spittel Date: Sun, 7 Oct 2018 10:39:57 -0400 Subject: [PATCH] add alt text to sidebar images (#842) * add alt text to sidebar images * add alt text to emoji heart * add alt text to sponsor logos * add aria-label to search bar * update snapshot for Search --- .gitignore | 4 ++-- .../src/components/Search/SearchForm.jsx | 1 + .../__snapshots__/Search.test.jsx.snap | 1 + app/views/articles/_sidebar.html.erb | 22 +++++++++---------- 4 files changed, 15 insertions(+), 13 deletions(-) diff --git a/.gitignore b/.gitignore index 53bd65a6e..8500a4f7c 100644 --- a/.gitignore +++ b/.gitignore @@ -19,13 +19,13 @@ vendor/bundle coverage /tags -#Ignore public uploads +# Ignore public uploads /public/uploads/* /public/c/* /public/i/* /public/assets/* -#Ignore node_modules +# Ignore node_modules node_modules/ # Generated js bundles diff --git a/app/javascript/src/components/Search/SearchForm.jsx b/app/javascript/src/components/Search/SearchForm.jsx index 48139d512..f8d0e37f7 100644 --- a/app/javascript/src/components/Search/SearchForm.jsx +++ b/app/javascript/src/components/Search/SearchForm.jsx @@ -23,6 +23,7 @@ export const SearchForm = ({ id={searchBoxId} placeholder="search" autoComplete="off" + aria-label="search" onKeyDown={onSearch} value={searchTerm} /> diff --git a/app/javascript/src/components/Search/__tests__/__snapshots__/Search.test.jsx.snap b/app/javascript/src/components/Search/__tests__/__snapshots__/Search.test.jsx.snap index 450f1d0a5..a4e6070c9 100644 --- a/app/javascript/src/components/Search/__tests__/__snapshots__/Search.test.jsx.snap +++ b/app/javascript/src/components/Search/__tests__/__snapshots__/Search.test.jsx.snap @@ -16,6 +16,7 @@ exports[` renders properly 1`] = ` value="✓" /> community sponsors - " /> + emoji heart" />