Skip to content

Commit

Permalink
fix(FEC-14131): change area label for "go to result" button
Browse files Browse the repository at this point in the history
  • Loading branch information
semarche-kaltura committed Aug 21, 2024
1 parent 60d5c47 commit 15b3184
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/components/transcript/transcript.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ const translates = {
errorDescripton: <Text id="transcript.load_failed">Failed to load transcript</Text>,
attachTranscript: <Text id="transcript.attach_transcript">Bring Transcript back</Text>,
detachTranscript: <Text id="transcript.detach_transcript">Popout transcript</Text>,
toSearchResult: <Text id="transcript.to_search_result">Go to result</Text>,
toSearchResultLabel: <Text id="transcript.to_search_result_label">Click to jump to this point in the video</Text>
toSearchResult: <Text id="transcript.to_search_result">Go to result</Text>
};

export interface TranscriptProps {
Expand All @@ -57,7 +56,6 @@ export interface TranscriptProps {
attachTranscript?: string;
detachTranscript?: string;
toSearchResult?: string;
toSearchResultLabel?: string;
downloadDisabled: boolean;
onDownload: () => void;
printDisabled: boolean;
Expand Down Expand Up @@ -275,7 +273,7 @@ export class Transcript extends Component<TranscriptProps, TranscriptState> {
};

private _renderJumpToSearchButton = () => {
const {toSearchResult, toSearchResultLabel, onJumpToSearchMatch} = this.props;
const {toSearchResult, onJumpToSearchMatch} = this.props;
const {search, activeSearchIndex, totalSearchResults} = this.state;
if (!search || totalSearchResults === 0 || activeSearchIndex === 0) {
return null;
Expand All @@ -285,7 +283,7 @@ export class Transcript extends Component<TranscriptProps, TranscriptState> {
type={ButtonType.secondary}
className={styles.toSearchButton}
onClick={onJumpToSearchMatch}
ariaLabel={toSearchResultLabel}
ariaLabel={toSearchResult}
testId="transcript_jumpToSearchMatch">
{toSearchResult}
</Button>
Expand Down

0 comments on commit 15b3184

Please sign in to comment.