From ea2b4c26050e922bcf22b0810a2fe1c7ebb9860f Mon Sep 17 00:00:00 2001 From: Tzipi-kaltura Date: Mon, 9 Dec 2024 16:06:07 +0200 Subject: [PATCH] fix(ADA-1791): [ORS] - Player - Screen reader (NVDA) is interpreting time values as clock times --- src/components/seekbar/seekbar.tsx | 11 +++++------ translations/de.i18n.json | 3 ++- translations/en.i18n.json | 3 ++- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/components/seekbar/seekbar.tsx b/src/components/seekbar/seekbar.tsx index 8d0ceea31..48e2062fa 100644 --- a/src/components/seekbar/seekbar.tsx +++ b/src/components/seekbar/seekbar.tsx @@ -44,7 +44,8 @@ const COMPONENT_NAME = 'SeekBar'; const KEYBOARD_DEFAULT_SEEK_JUMP: number = 5; const translates = { - sliderAriaLabel: Seek bar + sliderAriaLabel: Seek bar, + valuetextLabel: of }; /** @@ -580,11 +581,9 @@ class SeekBar extends Component { aria-valuemin={0} aria-valuemax={Math.round(this.props.duration)} aria-valuenow={Math.round(this.props.currentTime)} - aria-valuetext={`${getDurationAsText(props.currentTime, props.player.config.ui.locale, true)} of ${getDurationAsText( - props.duration, - props.player.config.ui.locale, - true - )}`} + aria-valuetext={`${getDurationAsText(props.currentTime, props.player.config.ui.locale, true)} ${ + this.props.valuetextLabel + } ${getDurationAsText(props.duration, props.player.config.ui.locale, true)}`} onMouseOver={this.onSeekbarMouseOver} onMouseLeave={this.onSeekbarMouseLeave} onMouseMove={this.onSeekbarMouseMove} diff --git a/translations/de.i18n.json b/translations/de.i18n.json index 33c0879f8..5bb4e3dd5 100644 --- a/translations/de.i18n.json +++ b/translations/de.i18n.json @@ -25,7 +25,8 @@ "logo": "Logo", "seekBarSlider": "Suchleiste", "readLess": "Weniger", - "readMore": "Mehr" + "readMore": "Mehr", + "valuetextLabel": "von" }, "unmute": { "unmute": "Ton an" diff --git a/translations/en.i18n.json b/translations/en.i18n.json index b1394bef0..ed708d3fe 100644 --- a/translations/en.i18n.json +++ b/translations/en.i18n.json @@ -26,7 +26,8 @@ "logo": "Logo", "seekBarSlider": "Seek bar", "readLess": "Less", - "readMore": "More" + "readMore": "More", + "valuetextLabel": "of" }, "unmute": { "unmute": "Unmute"