refactor: address Svelte compiler warnings and improve a11y/security

- Convert decorative labels to spans to fix a11y warnings in Accounts and Sites pages
- Add rel="noopener noreferrer" to external links for security
- Use untrack for Svelte 5 state initialization from props in e_app_sign_in_out.svelte
- Make TipTap editor styles global to fix scoping warnings for dynamic content
This commit is contained in:
Scott Idem
2026-02-09 20:22:51 -05:00
parent c1750dd04e
commit f24449457f
7 changed files with 14 additions and 14 deletions

View File

@@ -117,7 +117,7 @@
<div class="flex gap-2">
<input type="text" bind:value={cfg_json.header_image_path} class="input variant-form-material grow" placeholder="https://..." />
{#if cfg_json.header_image_path}
<a href={cfg_json.header_image_path} target="_blank" class="btn-icon variant-soft-surface"><ExternalLink size="1.2em" /></a>
<a href={cfg_json.header_image_path} target="_blank" rel="noopener noreferrer" class="btn-icon variant-soft-surface"><ExternalLink size="1.2em" /></a>
{/if}
</div>
</label>

View File

@@ -37,10 +37,10 @@
let { log_lvl = $bindable(0), data = null, hidden = $bindable(true) }: Props = $props();
let url_user_id = $state(data?.url?.searchParams?.get('user_id'));
let url_user_key = $state(data?.url?.searchParams?.get('user_key')); // Reminder that "key" is the site's auth key.
let url_user_username = $state(data?.url?.searchParams?.get('username'));
let url_user_email = $state(data?.url?.searchParams?.get('user_email'));
let url_user_id = $state(untrack(() => data?.url?.searchParams?.get('user_id')));
let url_user_key = $state(untrack(() => data?.url?.searchParams?.get('user_key'))); // Reminder that "key" is the site's auth key.
let url_user_username = $state(untrack(() => data?.url?.searchParams?.get('username')));
let url_user_email = $state(untrack(() => data?.url?.searchParams?.get('user_email')));
$effect(() => {
// NOTE: Sync URL params to state.

View File

@@ -1,5 +1,5 @@
/* Basic editor styles */
.tiptap {
:global(.tiptap) {
:first-child {
margin-top: 0;
}