Skip to content

Commit

Permalink
feat(theme-default): remove ari-hidden on title and use an empty alt …
Browse files Browse the repository at this point in the history
…on brand image if not specified
  • Loading branch information
nruffing committed Jan 28, 2024
1 parent 2979bc4 commit 4250903
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions themes/theme-default/src/client/components/NavbarBrand.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,7 @@ const navbarBrandLogo = computed(() => {
}
return themeLocale.value.logo
})
const navbarBrandLogoAlt = computed(
() => themeLocale.value.logoAlt ?? navbarBrandTitle.value,
)
const navBarLogoAltMatchesTitle = computed(
() =>
navbarBrandTitle.value.toLocaleUpperCase().trim() ===
navbarBrandLogoAlt.value.toLocaleUpperCase().trim(),
)
const navbarBrandLogoAlt = computed(() => themeLocale.value.logoAlt ?? '')
const NavbarBrandLogo: FunctionalComponent = () => {
if (!navbarBrandLogo.value) return null
const img = h('img', {
Expand All @@ -56,7 +49,6 @@ const NavbarBrandLogo: FunctionalComponent = () => {
v-if="navbarBrandTitle"
class="site-name"
:class="{ 'can-hide': navbarBrandLogo }"
:aria-hidden="navBarLogoAltMatchesTitle"
>
{{ navbarBrandTitle }}
</span>
Expand Down

0 comments on commit 4250903

Please sign in to comment.