Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/components/AccommodationPage.astro
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@ const areaDesc = (slug: AreaSlug) => t[`accommodation.areas.${slug}.desc` as key
href={t['accommodation.apartments.linkUrl']}
target="_blank"
rel="noopener noreferrer"
class="inline-flex items-center gap-2 bg-white text-pycon-red font-bold px-6 py-3 rounded-lg motion-safe:hover:scale-105 transition-transform no-underline focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-pycon-yellow"
aria-label={`${t['accommodation.apartments.link']} ${menuT.new_tab}`}
class="inline-flex items-center gap-2 bg-white text-pycon-red font-bold px-6 py-3 rounded-lg hover:scale-105 transition-transform no-underline"
>
{t['accommodation.apartments.link']}
<span class="sr-only"> ({t['accommodation.a11y.linkOpensNewTab']})</span>
Expand Down
1 change: 1 addition & 0 deletions src/components/LocationPage.astro
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ const transportIcons = {
href="https://maps.app.goo.gl/bMt7iLyNT2N2Et786"
target="_blank"
rel="noopener noreferrer"
aria-label={`${t['location.map.link']} ${menuT.new_tab}`}
class="inline-block w-full text-center bg-white text-pycon-red font-bold py-3 rounded-lg hover:bg-pycon-gray-25 transition-colors shadow-lg"
>
{t['location.map.link']}
Expand Down
3 changes: 1 addition & 2 deletions src/i18n/location/ca.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,5 +55,4 @@ export const ca = {
'El 22@Barcelona és la prova de com la ciutat ha transformat zones industrials en un epicentre de coneixement, situant-se al top 5 d’Europa en noves empreses tecnològiques.',
'location.city.connections.title': 'Connexions i mobilitat',
'location.city.connections.text':
'Sants és un node clau de l’AVE, connectant amb Madrid en 2.5h. L’Aeroport del Prat i una xarxa de mobilitat sostenible completen una accessibilitat excepcional.',
} as const
'Sants és un node clau de l’AVE, connectant amb Madrid en 2.5h. L’Aeroport del Prat i una xarxa de mobilitat sostenible completen una accessibilitat excepcional.', 'location.new_tab': "(s'obre en una pestanya nova)",} as const
1 change: 1 addition & 0 deletions src/i18n/menu/ca.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,5 @@ export const ca = {
],
},
],
new_tab: "(s'obre en una pestanya nova)",
} as const
1 change: 1 addition & 0 deletions src/i18n/menu/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,5 @@ export const en = {
],
},
],
new_tab: '(opens in new tab)',
} as const
1 change: 1 addition & 0 deletions src/i18n/menu/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,5 @@ export const es = {
],
},
],
new_tab: '(se abre en nueva pestaña)',
} as const
5 changes: 4 additions & 1 deletion src/layouts/components/Footer.astro
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
import { getRelativeLocaleUrl } from 'astro:i18n'
import { footerTexts } from '@/i18n/components/footer'
import { menuTexts } from '@/i18n/menu'
import SocialIcon from '@/components/icons/SocialIcon.astro'

interface Props {
Expand All @@ -17,6 +18,7 @@ type Lang = (typeof validLangs)[number]
const currentLang: Lang = validLangs.includes(rawLang as Lang) ? (rawLang as Lang) : 'es'

const t = footerTexts[currentLang]
const menuT = menuTexts[currentLang]

// Updated social links with semantic icon names
const socialLinks = [
Expand Down Expand Up @@ -102,7 +104,7 @@ const collaborators = [
target="_blank"
rel="noopener noreferrer"
class="group flex h-9 w-9 items-center justify-center rounded-lg bg-pycon-gray-100/10 bg-pycon-gray-100/20 border border-pycon-gray-100/10 text-pycon-black text-pycon-white transition-all hover:bg-pycon-yellow hover:text-pycon-black hover:scale-110 outline-none focus-visible:bg-pycon-yellow focus-visible:text-pycon-black"
aria-label={link.label}
aria-label={`${link.label} ${menuT.new_tab}`}
title={link.label}
>
<SocialIcon platform={link.iconName} size="md" aria-hidden="true" />
Expand All @@ -128,6 +130,7 @@ const collaborators = [
target="_blank"
rel="noopener noreferrer"
class="group transition-all hover:scale-105 outline-none focus-visible:ring-1 focus-visible:ring-pycon-orange rounded-md p-1"
aria-label={`${collab.name} ${menuT.new_tab}`}
title={collab.name}
>
<img
Expand Down
4 changes: 2 additions & 2 deletions src/layouts/components/Header/components/Navigation.astro
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ const { items } = menuTexts[currentLang]
class="submenu-item block px-4 py-3 rounded-md text-pycon-white font-medium transition-colors outline-none hover:text-pycon-yellow hover:bg-pycon-yellow-25/15 focus-visible:bg-pycon-orange focus-visible:text-white"
role="menuitem"
{...(isExternal(child.href)
? { target: '_blank', rel: 'noopener noreferrer' }
? { target: '_blank', rel: 'noopener noreferrer', 'aria-label': `${child.label} ${menuTexts[currentLang].new_tab}` }
: {})}
>
{child.label}
Expand Down Expand Up @@ -172,7 +172,7 @@ const { items } = menuTexts[currentLang]
href={getLocalizedUrl(currentLang, child.href)}
class="block px-4 py-3 rounded-md text-pycon-white font-medium transition-colors outline-none hover:text-pycon-yellow hover:bg-pycon-yellow-25/15 focus-visible:bg-pycon-orange focus-visible:text-white"
{...(isExternal(child.href)
? { target: '_blank', rel: 'noopener noreferrer' }
? { target: '_blank', rel: 'noopener noreferrer', 'aria-label': `${child.label} ${menuTexts[currentLang].new_tab}` }
: {})}
>
{child.label}
Expand Down
Loading