Legg til tilgjengelegheitsetiketter i PWA
- Legg til role=img og aria-label på retningspil-canvas - Oppdater aria-label dynamisk med avstand ved val av tilfluktsrom - Legg til direction_arrow_description-streng i alle tre språk Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
fa4c379176
commit
1a72314e30
5 changed files with 12 additions and 1 deletions
|
|
@ -43,7 +43,7 @@
|
|||
<!-- Bottom sheet with shelter info -->
|
||||
<div id="bottom-sheet">
|
||||
<div id="selected-shelter">
|
||||
<canvas id="mini-arrow" width="96" height="96"></canvas>
|
||||
<canvas id="mini-arrow" width="96" height="96" role="img" aria-label="Direction to shelter"></canvas>
|
||||
<div id="selected-shelter-info">
|
||||
<div id="selected-shelter-address"></div>
|
||||
<div id="selected-shelter-details"></div>
|
||||
|
|
|
|||
|
|
@ -256,6 +256,8 @@ function updateSelectedShelter(isUserAction: boolean): void {
|
|||
].join(' \u00B7 ');
|
||||
|
||||
// Update mini arrow
|
||||
const miniArrow = document.getElementById('mini-arrow')!;
|
||||
miniArrow.setAttribute('aria-label', t('direction_arrow_description', dist));
|
||||
updateMiniArrow(selected.bearingDegrees - deviceHeading);
|
||||
|
||||
// Update compass view
|
||||
|
|
|
|||
|
|
@ -46,4 +46,7 @@ export const en: Record<string, string> = {
|
|||
'No cached data available. Connect to the internet to download shelter data.',
|
||||
update_success: 'Shelter data updated',
|
||||
update_failed: 'Update failed \u2014 using cached data',
|
||||
|
||||
// Accessibility
|
||||
direction_arrow_description: 'Direction to shelter, %s away',
|
||||
};
|
||||
|
|
|
|||
|
|
@ -41,4 +41,7 @@ export const nb: Record<string, string> = {
|
|||
'Ingen lagrede data tilgjengelig. Koble til internett for \u00e5 laste ned tilfluktsromdata.',
|
||||
update_success: 'Tilfluktsromdata oppdatert',
|
||||
update_failed: 'Oppdatering mislyktes \u2014 bruker lagrede data',
|
||||
|
||||
// Tilgjengelighet
|
||||
direction_arrow_description: 'Retning til tilfluktsrom, %s unna',
|
||||
};
|
||||
|
|
|
|||
|
|
@ -41,4 +41,7 @@ export const nn: Record<string, string> = {
|
|||
'Ingen lagra data tilgjengeleg. Kopla til internett for \u00e5 laste ned tilfluktsromdata.',
|
||||
update_success: 'Tilfluktsromdata oppdatert',
|
||||
update_failed: 'Oppdatering mislukkast \u2014 brukar lagra data',
|
||||
|
||||
// Tilgjenge
|
||||
direction_arrow_description: 'Retning til tilfluktsrom, %s unna',
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue