From bdddd396d7769e3cd468501c47f77c5360d7b932 Mon Sep 17 00:00:00 2001 From: Arthur Le Meur Date: Wed, 11 Dec 2024 14:09:43 +0100 Subject: [PATCH 01/13] fix missing titles for accessibility in annotations menu --- src/renderer/reader/components/ReaderMenu.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/renderer/reader/components/ReaderMenu.tsx b/src/renderer/reader/components/ReaderMenu.tsx index f7398a8c4..3470ef3f8 100644 --- a/src/renderer/reader/components/ReaderMenu.tsx +++ b/src/renderer/reader/components/ReaderMenu.tsx @@ -848,10 +848,10 @@ const AnnotationList: React.FC<{ annotationUUIDFocused: string, resetAnnotationU // }); const selectDrawtypesOptions = [ - { name: "solid_background", svg: HighLightIcon }, - { name: "underline", svg: UnderLineIcon }, - { name: "strikethrough", svg: TextStrikeThroughtIcon }, - { name: "outline", svg: TextOutlineIcon }, + { name: "solid_background", svg: HighLightIcon, title: `${__("reader.annotations.type.solid")}` }, + { name: "underline", svg: UnderLineIcon, title: `${__("reader.annotations.type.underline")}` }, + { name: "strikethrough", svg: TextStrikeThroughtIcon, title: `${__("reader.annotations.type.strikethrough")}` }, + { name: "outline", svg: TextOutlineIcon, title: `${__("reader.annotations.type.outline")}` }, ]; const nbOfFilters = ((tagArrayFilter === "all") ? @@ -1043,7 +1043,7 @@ const AnnotationList: React.FC<{ annotationUUIDFocused: string, resetAnnotationU - {(item) => } + {(item) => } @@ -1158,7 +1158,7 @@ const AnnotationList: React.FC<{ annotationUUIDFocused: string, resetAnnotationU - + From 602855720f00c928929d2b4fd09790d61fcb58ed Mon Sep 17 00:00:00 2001 From: Arthur Le Meur Date: Wed, 11 Dec 2024 15:10:18 +0100 Subject: [PATCH 02/13] change selectDrawtypesOptions key title to textValue --- src/renderer/reader/components/ReaderMenu.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/renderer/reader/components/ReaderMenu.tsx b/src/renderer/reader/components/ReaderMenu.tsx index 3470ef3f8..c82275695 100644 --- a/src/renderer/reader/components/ReaderMenu.tsx +++ b/src/renderer/reader/components/ReaderMenu.tsx @@ -848,10 +848,10 @@ const AnnotationList: React.FC<{ annotationUUIDFocused: string, resetAnnotationU // }); const selectDrawtypesOptions = [ - { name: "solid_background", svg: HighLightIcon, title: `${__("reader.annotations.type.solid")}` }, - { name: "underline", svg: UnderLineIcon, title: `${__("reader.annotations.type.underline")}` }, - { name: "strikethrough", svg: TextStrikeThroughtIcon, title: `${__("reader.annotations.type.strikethrough")}` }, - { name: "outline", svg: TextOutlineIcon, title: `${__("reader.annotations.type.outline")}` }, + { name: "solid_background", svg: HighLightIcon, textValue: `${__("reader.annotations.type.solid")}` }, + { name: "underline", svg: UnderLineIcon, textValue: `${__("reader.annotations.type.underline")}` }, + { name: "strikethrough", svg: TextStrikeThroughtIcon, textValue: `${__("reader.annotations.type.strikethrough")}` }, + { name: "outline", svg: TextOutlineIcon, textValue: `${__("reader.annotations.type.outline")}` }, ]; const nbOfFilters = ((tagArrayFilter === "all") ? @@ -1043,7 +1043,7 @@ const AnnotationList: React.FC<{ annotationUUIDFocused: string, resetAnnotationU - {(item) => } + {(item) => } From 34486334beaa8a17e59b7f31a5b74a04484e565a Mon Sep 17 00:00:00 2001 From: Arthur Le Meur Date: Thu, 12 Dec 2024 10:11:40 +0100 Subject: [PATCH 03/13] up accessiblity --- src/renderer/library/components/utils/Slider.tsx | 2 ++ src/renderer/reader/components/AnnotationEdit.tsx | 14 +++++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/renderer/library/components/utils/Slider.tsx b/src/renderer/library/components/utils/Slider.tsx index 680a8000d..e2c8c18be 100644 --- a/src/renderer/library/components/utils/Slider.tsx +++ b/src/renderer/library/components/utils/Slider.tsx @@ -112,6 +112,7 @@ class Slider extends React.Component { className={classNames(stylesSlider.slider_button_prev, stylesButtons.button_transparency_icon)} onClick={this.handleMove.bind(this, false)} disabled={this.state.position < 0 ? false : true} + aria-hidden > @@ -126,6 +127,7 @@ class Slider extends React.Component { aria-label={__("accessibility.rightSlideButton")} className={classNames(stylesSlider.slider_button_next, stylesButtons.button_transparency_icon)} disabled={this.state.position > max ? false : true} + aria-hidden > diff --git a/src/renderer/reader/components/AnnotationEdit.tsx b/src/renderer/reader/components/AnnotationEdit.tsx index b84229472..100e770b9 100644 --- a/src/renderer/reader/components/AnnotationEdit.tsx +++ b/src/renderer/reader/components/AnnotationEdit.tsx @@ -209,10 +209,18 @@ export const AnnotationEdit: React.FC = (props) => {
+

{__("catalog.tag")}

Date: Thu, 12 Dec 2024 11:21:27 +0100 Subject: [PATCH 04/13] add missing aria-labels in ReaderHeader (tts inputs and annotations) --- src/renderer/reader/components/ReaderHeader.tsx | 5 ++++- src/renderer/reader/components/header/voiceSelection.tsx | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/renderer/reader/components/ReaderHeader.tsx b/src/renderer/reader/components/ReaderHeader.tsx index dc5369434..58168f190 100644 --- a/src/renderer/reader/components/ReaderHeader.tsx +++ b/src/renderer/reader/components/ReaderHeader.tsx @@ -731,6 +731,9 @@ export class ReaderHeader extends React.Component { { { aria-hidden="true" className={stylesReader.menu_button} id="annotationLabel" - aria-label={__("reader.navigation.annotationTitle")} title={__("reader.navigation.annotationTitle")} > diff --git a/src/renderer/reader/components/header/voiceSelection.tsx b/src/renderer/reader/components/header/voiceSelection.tsx index 87e51da7c..f5b94f6ec 100644 --- a/src/renderer/reader/components/header/voiceSelection.tsx +++ b/src/renderer/reader/components/header/voiceSelection.tsx @@ -44,6 +44,7 @@ export const VoiceSelection: React.FC = (props) => { = (props) => { Date: Mon, 16 Dec 2024 09:43:46 +0100 Subject: [PATCH 05/13] change home lists from "div" to semantic "ul" and "li" --- src/renderer/assets/styles/components/slider.scss | 6 ++++++ src/renderer/library/components/utils/Slider.tsx | 14 +++++++------- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/renderer/assets/styles/components/slider.scss b/src/renderer/assets/styles/components/slider.scss index dd8c4fa34..c24a53ebf 100644 --- a/src/renderer/assets/styles/components/slider.scss +++ b/src/renderer/assets/styles/components/slider.scss @@ -17,10 +17,16 @@ position: absolute; top: 0; left: 0; + margin: 0; + padding: 0; & > *:not(:first-child) { margin-left: 15px; } + + li { + list-style-type: none; + } } > button { diff --git a/src/renderer/library/components/utils/Slider.tsx b/src/renderer/library/components/utils/Slider.tsx index e2c8c18be..6e1c5f3b4 100644 --- a/src/renderer/library/components/utils/Slider.tsx +++ b/src/renderer/library/components/utils/Slider.tsx @@ -37,15 +37,15 @@ interface IState { } class Slider extends React.Component { - private contentRef: React.RefObject; - private contentElRefs: HTMLDivElement[] = []; + private contentRef: React.RefObject; + private contentElRefs: HTMLLIElement[] = []; private wrapperRef: React.RefObject; // private contentElVisible: boolean[] = []; constructor(props: IProps) { super(props); - this.contentRef = React.createRef(); + this.contentRef = React.createRef(); this.wrapperRef = React.createRef(); this.state = { @@ -118,9 +118,9 @@ class Slider extends React.Component {
{this.handleScroll(e)}} */> -
+
    {list} -
+