Skip to content

Commit

Permalink
chore: a11y fix FAQ page iroco-co/audits-frago#3
Browse files Browse the repository at this point in the history
  • Loading branch information
bamthomas committed Nov 28, 2023
1 parent a94b019 commit e519795
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
1 change: 1 addition & 0 deletions src/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@
"rest": "The rest is used to pay our other costs and to compensate the Iroco team."
},
"chart": {
"title": "Breakdown of service costs for Iroco",
"tax": {
"title": "VAT",
"percentage": ": 20% (i.e. 16% including taxes)"
Expand Down
1 change: 1 addition & 0 deletions src/i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@
"rest": "Le reste sert à payer nos autres frais et à rémunérer l'équipe d'Iroco."
},
"chart": {
"title": "Diagramme de répartition des coûts de service pour Iroco",
"tax": {
"title": "TVA",
"percentage": ": 20% (soit 16% HT)"
Expand Down
8 changes: 4 additions & 4 deletions src/lib/Chart.svelte → src/lib/SubscriptionChart.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
role="img"
width={(5 * size) / 3}
>
<title>Subscription Chart</title>
<title>{$_("faq.questions.subscription.chart.title")}</title>
<g data-z-index="3">
<g data-z-index=".1" stroke-linejoin="round">
<path
Expand Down Expand Up @@ -72,7 +72,7 @@
y="16"
transform="translate(479 176)"
fill="#f2ebe3"
font-fontSize="1em"
font-size="1em"
>
<tspan>{$_("faq.questions.subscription.chart.payment.title")}</tspan>
&nbsp;{$_("faq.questions.subscription.chart.payment.percentage")}
Expand All @@ -85,7 +85,7 @@
y="16"
transform="translate(182 347)"
fill="#f2ebe3"
font-fontSize="1rem"
font-size="1rem"
>
<tspan>{$_("faq.questions.subscription.chart.hosting.title")}</tspan>
&nbsp;{$_("faq.questions.subscription.chart.hosting.percentage")}
Expand All @@ -98,7 +98,7 @@
y="16"
transform="translate(90 85)"
fill="#f2ebe3"
font-fontSize="1rem"
font-size="1rem"
>
<tspan>{$_("faq.questions.subscription.chart.iroco.title")}</tspan>
&nbsp;{$_("faq.questions.subscription.chart.iroco.percentage")}
Expand Down
4 changes: 2 additions & 2 deletions src/routes/faq/+page.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
/* eslint svelte/no-at-html-tags: "off" */
import { _ } from "svelte-i18n";
import Chart from "../../lib/Chart.svelte";
import SubscriptionChart from "$lib/SubscriptionChart.svelte";
let windowWidth: number;
</script>

Expand Down Expand Up @@ -227,7 +227,7 @@
<li>{$_("faq.questions.subscription.list.deployment")}</li>
<li>{$_("faq.questions.subscription.list.rest")}</li>
</ul>
<Chart size={Math.min((windowWidth * 0.8) / 2, 500)} />
<SubscriptionChart size={Math.min((windowWidth * 0.8) / 2, 500)} />
</div>
<div id="account" class="faq__q-a__account question">
<h3>
Expand Down
2 changes: 1 addition & 1 deletion test/unit/Chart.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*global describe, test, expect*/
import "@testing-library/jest-dom/extend-expect";
import { render } from "@testing-library/svelte";
import Chart from "../../src/lib/Chart.svelte";
import Chart from "$lib/SubscriptionChart.svelte";
import en from "../../src/i18n/en.json";
import { addMessages, init } from "svelte-i18n";

Expand Down

0 comments on commit e519795

Please sign in to comment.