Openverse is a search engine for openly-licensed media. This monorepo includes all application code.
Replace span with h2 on image search results (#1888)
Olga Bulata97a8d7bec1d
diff --git a/frontend/src/components/VSearchResultsGrid/VImageCell.vue b/frontend/src/components/VSearchResultsGrid/VImageCell.vueindex 38a484081..5451a5067 100644--- a/frontend/src/components/VSearchResultsGrid/VImageCell.vue+++ b/frontend/src/components/VSearchResultsGrid/VImageCell.vue@@ -31,7 +31,7 @@<figcaptionclass="invisible absolute bottom-0 left-0 bg-white p-1 text-dark-charcoal group-hover:visible group-focus:visible">- <span class="sr-only">{{ image.title }}</span>+ <h2 class="sr-only">{{ image.title }}</h2><VLicense :license="image.license" :hide-name="true" /></figcaption></figure>diff --git a/frontend/test/unit/specs/components/related-images.spec.js b/frontend/test/unit/specs/components/related-images.spec.jsindex 718142d31..8a11d5e38 100644--- a/frontend/test/unit/specs/components/related-images.spec.js+++ b/frontend/test/unit/specs/components/related-images.spec.js@@ -38,9 +38,10 @@ describe("RelatedImage", () => {it("should render an image grid", () => {render(VRelatedImages, options)- expect(screen.getByRole("heading").textContent).toContain(+ expect(screen.getAllByRole("heading")[0].textContent).toContain("image-details.related-images")+ expect(screen.queryAllByRole("heading").length).toEqual(3)expect(screen.queryAllByRole("img").length).toEqual(2)expect(screen.queryAllByRole("figure").length).toEqual(2)})