diff --git a/ts/lib/components/TitledContainer.svelte b/ts/lib/components/TitledContainer.svelte index 70e4a078c..3ea932ba3 100644 --- a/ts/lib/components/TitledContainer.svelte +++ b/ts/lib/components/TitledContainer.svelte @@ -12,7 +12,6 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html export { className as class }; export let title: string; - export let onTitleClick: ((_e: MouseEvent | KeyboardEvent) => void) | null = null;
- {#if onTitleClick} - -

- {title} -

-
- {:else} -

- {title} -

- {/if} +

+ {title} +

diff --git a/ts/routes/graphs/Graph.svelte b/ts/routes/graphs/Graph.svelte index 2c509639e..c8da588c5 100644 --- a/ts/routes/graphs/Graph.svelte +++ b/ts/routes/graphs/Graph.svelte @@ -8,7 +8,6 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html // When title is null (default), the graph is inlined, not having TitledContainer wrapper. export let title: string | null = null; export let subtitle: string | null = null; - export let onTitleClick: ((_e: MouseEvent | KeyboardEvent) => void) | null = null; {#if title == null} @@ -19,8 +18,8 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
{:else} - - + +
{#if subtitle}
{subtitle}
diff --git a/ts/routes/graphs/TrueRetention.svelte b/ts/routes/graphs/TrueRetention.svelte index 6b89ab9b8..4a9738831 100644 --- a/ts/routes/graphs/TrueRetention.svelte +++ b/ts/routes/graphs/TrueRetention.svelte @@ -57,22 +57,29 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html const title = tr.statisticsTrueRetentionTitle(); const subtitle = tr.statisticsTrueRetentionSubtitle(); - const onTitleClick = () => { + const onHelpClick = () => { openHelpModal(Object.keys(retentionHelp).indexOf("trueRetention")); }; - - +
{ - modal = e.detail.modal; - carousel = e.detail.carousel; - }} - /> + onclick={onHelpClick} + onkeydown={onHelpClick} + role="button" + tabindex="-1" + > + { + modal = e.detail.modal; + carousel = e.detail.carousel; + }} + /> +