Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix accessibility #2705

Open
wants to merge 16 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions src/renderer/reader/components/Reader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -811,9 +811,14 @@ class Reader extends React.Component<IProps, IState> {
/>
:
<div className={stylesReader.exitZen_container}>
<button onClick={() => this.setState({ zenMode : false})} className={stylesReader.button_exitZen} style={{ opacity: isPaginated ? "1" : "0"}}>
<SVG ariaHidden svg={exitZenModeIcon} />
</button>
<button onClick={() => this.setState({ zenMode: false })}
className={stylesReader.button_exitZen}
style={{ opacity: isPaginated ? "1" : "0" }}
aria-label={this.props.__("reader.navigation.ZenModeExit")}
title={this.props.__("reader.navigation.ZenModeExit")}
>
<SVG ariaHidden svg={exitZenModeIcon} />
</button>
</div>
}

Expand Down
4 changes: 2 additions & 2 deletions src/renderer/reader/components/ReaderHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1255,8 +1255,8 @@ export class ReaderHeader extends React.Component<IProps, IState> {
onClick={() => this.props.ReaderSettingsProps.setZenMode(!this.props.ReaderSettingsProps.zenMode)}
ref={this.enableFullscreenRef}
aria-pressed={this.props.fullscreen}
aria-label={__("reader.navigation.fullscreenTitle")}
title={__("reader.navigation.fullscreenTitle")}
aria-label={__("reader.navigation.ZenModeTitle")}
title={__("reader.navigation.ZenModeTitle")}
>
<SVG ariaHidden={true} svg={viewMode} />
</button>
Expand Down
2 changes: 2 additions & 0 deletions src/resources/locales/en.json
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added those keys to the localisation table in the support pages edrlab/thorium-reader-doc@c7453f8

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if Zen mode replace Full screen. In this case, the old key should be deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,8 @@
"currentPageTotal": "Current page: {{- current}}/{{- total}}",
"detachWindowTitle": "show library / bookshelf window",
"fullscreenTitle": "go fullscreen",
"ZenModeTitle": "Zen mode",
"ZenModeExit": "Exit Zen mode",
"goTo": "Go to",
"goToError": "Page break does not exist",
"goToPlaceHolder": "Enter page number",
Expand Down
2 changes: 2 additions & 0 deletions src/resources/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,8 @@
"currentPageTotal": "Page courante: {{- current}}/{{- total}}",
"detachWindowTitle": "afficher la bibliothèque",
"fullscreenTitle": "mode plein écran",
"ZenModeTitle": "Mode Zen",
"ZenModeExit": "Sortir du mode Zen",
"goTo": "Aller à",
"goToError": "Cette page n'existe pas",
"goToPlaceHolder": "Entrer un numéro de page",
Expand Down
2 changes: 1 addition & 1 deletion src/typings/en.translation-keys.d.ts

Large diffs are not rendered by default.

16 changes: 11 additions & 5 deletions src/typings/en.translation.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -836,6 +836,8 @@ declare namespace typed_i18n {
readonly "currentPageTotal": string,
readonly "detachWindowTitle": string,
readonly "fullscreenTitle": string,
readonly "ZenModeTitle": string,
readonly "ZenModeExit": string,
readonly "goTo": string,
readonly "goToError": string,
readonly "goToPlaceHolder": string,
Expand Down Expand Up @@ -934,6 +936,7 @@ declare namespace typed_i18n {
readonly "tts": {
readonly "activate": string,
readonly "default": string,
readonly "language": string,
readonly "next": string,
readonly "pause": string,
readonly "play": string,
Expand All @@ -942,8 +945,7 @@ declare namespace typed_i18n {
readonly "sentenceDetectDescription": string,
readonly "speed": string,
readonly "stop": string,
readonly "voice": string,
readonly "language": string
readonly "voice": string
}
};
(_: "reader.annotations", __?: {}): {
Expand Down Expand Up @@ -1121,6 +1123,8 @@ declare namespace typed_i18n {
readonly "currentPageTotal": string,
readonly "detachWindowTitle": string,
readonly "fullscreenTitle": string,
readonly "ZenModeTitle": string,
readonly "ZenModeExit": string,
readonly "goTo": string,
readonly "goToError": string,
readonly "goToPlaceHolder": string,
Expand All @@ -1141,6 +1145,8 @@ declare namespace typed_i18n {
(_: "reader.navigation.currentPageTotal", __?: {}): string;
(_: "reader.navigation.detachWindowTitle", __?: {}): string;
(_: "reader.navigation.fullscreenTitle", __?: {}): string;
(_: "reader.navigation.ZenModeTitle", __?: {}): string;
(_: "reader.navigation.ZenModeExit", __?: {}): string;
(_: "reader.navigation.goTo", __?: {}): string;
(_: "reader.navigation.goToError", __?: {}): string;
(_: "reader.navigation.goToPlaceHolder", __?: {}): string;
Expand Down Expand Up @@ -1375,6 +1381,7 @@ declare namespace typed_i18n {
(_: "reader.tts", __?: {}): {
readonly "activate": string,
readonly "default": string,
readonly "language": string,
readonly "next": string,
readonly "pause": string,
readonly "play": string,
Expand All @@ -1383,11 +1390,11 @@ declare namespace typed_i18n {
readonly "sentenceDetectDescription": string,
readonly "speed": string,
readonly "stop": string,
readonly "voice": string,
readonly "language": string
readonly "voice": string
};
(_: "reader.tts.activate", __?: {}): string;
(_: "reader.tts.default", __?: {}): string;
(_: "reader.tts.language", __?: {}): string;
(_: "reader.tts.next", __?: {}): string;
(_: "reader.tts.pause", __?: {}): string;
(_: "reader.tts.play", __?: {}): string;
Expand All @@ -1397,7 +1404,6 @@ declare namespace typed_i18n {
(_: "reader.tts.speed", __?: {}): string;
(_: "reader.tts.stop", __?: {}): string;
(_: "reader.tts.voice", __?: {}): string;
(_: "reader.tts.language", __?: {}): string;
(_: "settings", __?: {}): {
readonly "annotationCreator": {
readonly "creator": string,
Expand Down
Loading