From 8ff163de5281864636a9bdcda42bafd2123d2ba7 Mon Sep 17 00:00:00 2001 From: Sakari Malkki Date: Mon, 15 Jun 2026 11:24:29 +0300 Subject: [PATCH 1/2] Forces chart aria label to read only the title of the chart --- package.json | 2 +- src/core/chartOptions/chartOptions.ts | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 09ecda1..9022f4d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@statisticsfinland/pxvisualizer", - "version": "1.4.8", + "version": "1.4.9", "description": "Component library for visualizing PxGraf data", "main": "./dist/pxv.cjs", "jestSonar": { diff --git a/src/core/chartOptions/chartOptions.ts b/src/core/chartOptions/chartOptions.ts index 7c81414..3b34153 100644 --- a/src/core/chartOptions/chartOptions.ts +++ b/src/core/chartOptions/chartOptions.ts @@ -37,7 +37,12 @@ export const commonChartOptions = (view: View, locale: string, options?: IChartO tooltip: { formatter: getToolTipFormatterFunction(view, locale) }, - yAxis: [commonYAxisOptions] + yAxis: [commonYAxisOptions], + lang: { + accessibility: { + chartContainerLabel: "{title}" // Reads the title of the chart but omits the 'Highcharts interactive chart' part which is read by default and is redundant in our case + } + } }; } From 50f8a73086e9db6fb7718ac129a2b6491e1077d9 Mon Sep 17 00:00:00 2001 From: Sakari Malkki Date: Mon, 15 Jun 2026 12:51:24 +0300 Subject: [PATCH 2/2] Use view header per locale instead of title in case title is null --- src/core/chartOptions/chartOptions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/chartOptions/chartOptions.ts b/src/core/chartOptions/chartOptions.ts index 3b34153..b356fc1 100644 --- a/src/core/chartOptions/chartOptions.ts +++ b/src/core/chartOptions/chartOptions.ts @@ -40,7 +40,7 @@ export const commonChartOptions = (view: View, locale: string, options?: IChartO yAxis: [commonYAxisOptions], lang: { accessibility: { - chartContainerLabel: "{title}" // Reads the title of the chart but omits the 'Highcharts interactive chart' part which is read by default and is redundant in our case + chartContainerLabel: view.header[locale] // Reads the title of the chart but omits the 'Highcharts interactive chart' part which is read by default and is redundant in our case } } };