Skip to content

Commit

Permalink
Replace span with h2 on image search results (#1888)
Browse files Browse the repository at this point in the history
* Replace span with h2 for image results
  • Loading branch information
obulat authored May 2, 2023
1 parent 6ed3daf commit a97a8d7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/VSearchResultsGrid/VImageCell.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<figcaption
class="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>
Expand Down
3 changes: 2 additions & 1 deletion frontend/test/unit/specs/components/related-images.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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)
})
Expand Down

0 comments on commit a97a8d7

Please sign in to comment.