Skip to content

Commit

Permalink
fix(ADA-1791): [ORS] - Player - Screen reader (NVDA) is interpreting …
Browse files Browse the repository at this point in the history
…time values as clock times (#964)

Issue:
In non English languages the time is always time of time with no translation.

Fix:
Adding translations to "of" word

related to #955

Resolves ADA-1791
  • Loading branch information
Tzipi-kaltura authored Dec 12, 2024
1 parent b18d8fc commit 098faf4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
11 changes: 5 additions & 6 deletions src/components/seekbar/seekbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ const COMPONENT_NAME = 'SeekBar';
const KEYBOARD_DEFAULT_SEEK_JUMP: number = 5;

const translates = {
sliderAriaLabel: <Text id="controls.seekBarSlider">Seek bar</Text>
sliderAriaLabel: <Text id="controls.seekBarSlider">Seek bar</Text>,
valuetextLabel: <Text id="controls.valuetextLabel">of</Text>
};

/**
Expand Down Expand Up @@ -580,11 +581,9 @@ class SeekBar extends Component<any, any> {
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}
Expand Down
3 changes: 2 additions & 1 deletion translations/de.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
"logo": "Logo",
"seekBarSlider": "Suchleiste",
"readLess": "Weniger",
"readMore": "Mehr"
"readMore": "Mehr",
"valuetextLabel": "von"
},
"unmute": {
"unmute": "Ton an"
Expand Down
3 changes: 2 additions & 1 deletion translations/en.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"logo": "Logo",
"seekBarSlider": "Seek bar",
"readLess": "Less",
"readMore": "More"
"readMore": "More",
"valuetextLabel": "of"
},
"unmute": {
"unmute": "Unmute"
Expand Down

0 comments on commit 098faf4

Please sign in to comment.