forked from MapComplete/MapComplete
UI: fix #1848, explicitly add element to help screen readers pronounce everything correctly
This commit is contained in:
parent
cecfaebf5b
commit
9832aa45f0
6 changed files with 94 additions and 35 deletions
|
|
@ -6,19 +6,25 @@
|
|||
import WeblateLink from "./WeblateLink.svelte"
|
||||
import { Store } from "../../Logic/UIEventSource"
|
||||
import FromHtml from "./FromHtml.svelte"
|
||||
import { Utils } from "../../Utils"
|
||||
|
||||
export let t: Translation
|
||||
export let cls: string = ""
|
||||
// Text for the current language
|
||||
let txt: Store<string | undefined> = t?.current
|
||||
let lang = t?.currentLang
|
||||
$: {
|
||||
txt = t?.current
|
||||
lang = t?.currentLang
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
{#if $txt}
|
||||
<span class={cls}>
|
||||
<FromHtml src={$txt} />
|
||||
<span lang={$lang}>
|
||||
{@html Utils.purify($txt)}
|
||||
</span>
|
||||
<WeblateLink context={t?.context} />
|
||||
</span>
|
||||
{/if}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue