Skip to content

Commit 392cf4f

Browse files
committed
fix i18n aria-label
1 parent e67fe0c commit 392cf4f

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ The `controls` attribute defaults to `false` and should never be changed to `tru
120120
| customControlsSection | [Array<string \|<br>ReactElement>](https://github.com/lhz516/react-h5-audio-player/blob/fa1a61eb7f77146e1ce4547a14181279be68ecfd/src/index.tsx#L92) | [ADDITIONAL_CONTROLS,<br>MAIN_CONTROLS,<br>VOLUME_CONTROLS] | [Custom layout](https://static.hanzluo.com/react-h5-audio-player-storybook/index.html?path=/docs/layouts-advanced) of controls section |
121121
| customAdditionalControls | [Array<string \|<br>ReactElement>](https://github.com/lhz516/react-h5-audio-player/blob/fa1a61eb7f77146e1ce4547a14181279be68ecfd/src/index.tsx#L93) | [LOOP] | [Custom layout](https://static.hanzluo.com/react-h5-audio-player-storybook/index.html?path=/docs/layouts-advanced) of additional controls |
122122
| customVolumeControls | [Array<string \|<br>ReactElement>](https://github.com/lhz516/react-h5-audio-player/blob/fa1a61eb7f77146e1ce4547a14181279be68ecfd/src/index.tsx#L94) | [VOLUME] | [Custom layout](https://static.hanzluo.com/react-h5-audio-player-storybook/index.html?path=/docs/layouts-advanced) of volume controls |
123-
| i18nAriaLabels | Object | I18nAriaLabels | A configuration object to overwrite the default `aria-label` on the action buttons |
123+
| i18nAriaLabels | [I18nAriaLabels](https://github.com/lhz516/react-h5-audio-player/blob/e67fe0cdd39d00490b7396ebdc46357815ecb227/src/index.tsx#L138)| [I18nAriaLabels](https://github.com/lhz516/react-h5-audio-player/blob/e67fe0cdd39d00490b7396ebdc46357815ecb227/src/index.tsx#L183) | A configuration object to overwrite the default `aria-label` on the action buttons |
124124
| mse | Object | null | A configuration object so the player can play audio chunks, MSE streams and encrypted audio (See [section about Media Source Extensions](#media-source-extensions-and-encrypted-media-extensions) in this Readme) |
125125
| mse.srcDuration | number | - | The complete duration of the MSE audio chunks together (this is a key of the _mse_ prop) |
126126
| mse.onSeek | Function (Event) | - | The callback to be used when seek happens (this is a key of the _mse_ prop) |

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-h5-audio-player",
3-
"version": "3.8.0",
3+
"version": "3.8.1",
44
"description": "A customizable React audio player. Written in TypeScript. Mobile compatible. Keyboard friendly",
55
"main": "./lib/index.js",
66
"module": "./es/index.js",

src/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ class H5AudioPlayer extends Component<PlayerProps> {
485485
</button>
486486
{showJumpControls && (
487487
<button
488-
aria-label="Forward"
488+
aria-label={i18nAriaLabels.forward}
489489
className="rhap_button-clear rhap_main-controls-button rhap_forward-button"
490490
type="button"
491491
onClick={this.handleClickForward}
@@ -495,7 +495,7 @@ class H5AudioPlayer extends Component<PlayerProps> {
495495
)}
496496
{showSkipControls && (
497497
<button
498-
aria-label="Skip"
498+
aria-label={i18nAriaLabels.next}
499499
className="rhap_button-clear rhap_main-controls-button rhap_skip-button"
500500
type="button"
501501
onClick={onClickNext}
@@ -545,7 +545,7 @@ class H5AudioPlayer extends Component<PlayerProps> {
545545
return (
546546
<div key={key} className="rhap_volume-container">
547547
<button
548-
aria-label={volume ? 'Mute' : 'Unmute'}
548+
aria-label={volume ? i18nAriaLabels.volume : i18nAriaLabels.volumeMute}
549549
onClick={this.handleClickVolumeButton}
550550
type="button"
551551
className="rhap_button-clear rhap_volume-button"

0 commit comments

Comments
 (0)