Skip to content

Openverse is a search engine for openly-licensed media. This monorepo includes all application code.

Correct heading order for single audio result pages (#1659)

Christopher Hickeya1cf754165f5
diff --git a/src/components/VAudioDetails/VAudioDetails.vue b/src/components/VAudioDetails/VAudioDetails.vue
index 806569862..4cb0b5e49 100644
--- a/src/components/VAudioDetails/VAudioDetails.vue
+++ b/src/components/VAudioDetails/VAudioDetails.vue
@@ -1,9 +1,9 @@
<template>
<section class="audio-info">
<header class="mb-6 flex flex-row items-center justify-between">
- <h4 class="text-2xl lg:text-3xl">
+ <h2 class="text-2xl lg:text-3xl">
{{ $t('audio-details.information') }}
- </h4>
+ </h2>
<VContentReportPopover :media="audio" />
</header>
diff --git a/src/components/VAudioDetails/VRelatedAudio.vue b/src/components/VAudioDetails/VRelatedAudio.vue
index 75d5170f9..0fd4c2600 100644
--- a/src/components/VAudioDetails/VRelatedAudio.vue
+++ b/src/components/VAudioDetails/VRelatedAudio.vue
@@ -1,8 +1,8 @@
<template>
<aside :aria-label="$t('audio-details.related-audios')">
- <h4 class="mb-6 text-2xl lg:text-3xl">
+ <h2 class="mb-6 text-2xl lg:text-3xl">
{{ $t('audio-details.related-audios') }}
- </h4>
+ </h2>
<div v-if="!fetchState.isError" class="mb-12 flex flex-col gap-8 lg:gap-12">
<VAudioTrack
v-for="audio in media"
diff --git a/src/components/VMediaInfo/VCopyLicense.vue b/src/components/VMediaInfo/VCopyLicense.vue
index ff5f14de1..8540a48db 100644
--- a/src/components/VMediaInfo/VCopyLicense.vue
+++ b/src/components/VMediaInfo/VCopyLicense.vue
@@ -1,11 +1,11 @@
<template>
<div>
- <h5
+ <h3
id="copy-license-title"
class="mb-4 text-base font-semibold md:text-2xl"
>
{{ $t('media-details.reuse.copy-license.title') }}
- </h5>
+ </h3>
<VTabs label="#copy-license-title" :selected-id="tabs[0]">
<template #tabs>
diff --git a/src/components/VMediaInfo/VMediaLicense.vue b/src/components/VMediaInfo/VMediaLicense.vue
index 34a4e2c90..d083c3796 100644
--- a/src/components/VMediaInfo/VMediaLicense.vue
+++ b/src/components/VMediaInfo/VMediaLicense.vue
@@ -1,8 +1,8 @@
<template>
<div class="media-attribution">
- <h5 class="mb-4 text-base font-semibold md:text-2xl">
+ <h3 class="mb-4 text-base font-semibold md:text-2xl">
{{ headerText }}
- </h5>
+ </h3>
<template v-if="isLicense">
<i18n
diff --git a/src/components/VMediaInfo/VMediaReuse.vue b/src/components/VMediaInfo/VMediaReuse.vue
index 92eb68c4d..bcf34b60d 100644
--- a/src/components/VMediaInfo/VMediaReuse.vue
+++ b/src/components/VMediaInfo/VMediaReuse.vue
@@ -3,9 +3,9 @@
:aria-label="$t('media-details.reuse.title').toString()"
class="media-reuse"
>
- <h3 class="mb-6 text-2xl md:text-3xl">
+ <h2 class="mb-6 text-2xl md:text-3xl">
{{ $t('media-details.reuse.title') }}
- </h3>
+ </h2>
<div v-if="media.license_url" class="grid gap-6 md:grid-cols-2">
<VMediaLicense
:license="media.license"
diff --git a/test/playwright/visual-regression/components/media-reuse.spec.ts b/test/playwright/visual-regression/components/media-reuse.spec.ts
index 09cb887d7..f07f7a461 100644
--- a/test/playwright/visual-regression/components/media-reuse.spec.ts
+++ b/test/playwright/visual-regression/components/media-reuse.spec.ts
@@ -30,7 +30,7 @@ test.describe('media-reuse', () => {
await page.locator(`#tab-${tab.id}`).click()
// Make sure the tab is not focused and doesn't have a pink ring
const reuseTitle = t('media-details.reuse.title', dir)
- await page.locator(`h3:has-text("${reuseTitle}")`).click()
+ await page.locator(`h2:has-text("${reuseTitle}")`).click()
await expectSnapshot(
`media-reuse-${dir}-${tab.id}-tab`,
page.locator('.media-reuse')
diff --git a/test/unit/specs/components/related-audios.spec.js b/test/unit/specs/components/related-audios.spec.js
index 92ad97a38..224ea0698 100644
--- a/test/unit/specs/components/related-audios.spec.js
+++ b/test/unit/specs/components/related-audios.spec.js
@@ -32,7 +32,7 @@ describe('RelatedAudios', () => {
it('should render content when finished loading related audios', async () => {
const wrapper = await doRender()
- const header = wrapper.find('h4').text()
+ const header = wrapper.find('h2').text()
expect(header).toEqual('audio-details.related-audios')
const audioTracks = wrapper.findAll('vaudiotrack-stub')