From 5f0243d369864d650dd2c1f9f0afd938ca481c8a Mon Sep 17 00:00:00 2001 From: Pierre Leroux Date: Tue, 3 Dec 2024 18:06:43 +0100 Subject: [PATCH] fix(GUI): radix a11y Dialog.Title visuallyHidden on publicationInfo Dialog Dialog.content aria-describedby set to undefined on all Dialog.content components --- .../publicationInfos/publicationInfoContent.tsx | 7 +++++-- src/renderer/library/components/Wizard.tsx | 2 +- .../library/components/dialog/ApiappAddForm.tsx | 2 +- .../library/components/dialog/OpdsFeedAddForm.tsx | 2 +- .../library/components/dialog/OpdsFeedUpdateForm.tsx | 2 +- .../dialog/publicationInfos/PublicationInfo.tsx | 11 +++++++++-- src/renderer/library/components/settings/Settings.tsx | 2 +- .../dialog/publicationInfos/PublicationInfo.tsx | 6 +++++- 8 files changed, 24 insertions(+), 10 deletions(-) diff --git a/src/renderer/common/components/dialog/publicationInfos/publicationInfoContent.tsx b/src/renderer/common/components/dialog/publicationInfos/publicationInfoContent.tsx index 59c9472d0..cbf822ea0 100644 --- a/src/renderer/common/components/dialog/publicationInfos/publicationInfoContent.tsx +++ b/src/renderer/common/components/dialog/publicationInfos/publicationInfoContent.tsx @@ -42,7 +42,7 @@ import { useTranslator } from "readium-desktop/renderer/common/hooks/useTranslat import { useSelector } from "readium-desktop/renderer/common/hooks/useSelector"; import { ICommonRootState } from "readium-desktop/common/redux/states/commonRootState"; - +import * as VisuallyHidden from "@radix-ui/react-visually-hidden"; export interface IProps { @@ -411,7 +411,10 @@ export const PublicationInfoContent: React.FC> = {/*
*/} - + + + {__("catalog.bookInfo")} +
{ */}
- + diff --git a/src/renderer/library/components/dialog/ApiappAddForm.tsx b/src/renderer/library/components/dialog/ApiappAddForm.tsx index 1308ce1cf..8f1bf831f 100644 --- a/src/renderer/library/components/dialog/ApiappAddForm.tsx +++ b/src/renderer/library/components/dialog/ApiappAddForm.tsx @@ -210,7 +210,7 @@ export const ApiappAddFormDialog = () => {
- +
{__("opds.addFormApiapp.title")} diff --git a/src/renderer/library/components/dialog/OpdsFeedAddForm.tsx b/src/renderer/library/components/dialog/OpdsFeedAddForm.tsx index 1bdd39828..685240fb6 100644 --- a/src/renderer/library/components/dialog/OpdsFeedAddForm.tsx +++ b/src/renderer/library/components/dialog/OpdsFeedAddForm.tsx @@ -82,7 +82,7 @@ export const OpdsFeedAddFormDialog = () => {
- +
{__("opds.addMenu")} diff --git a/src/renderer/library/components/dialog/OpdsFeedUpdateForm.tsx b/src/renderer/library/components/dialog/OpdsFeedUpdateForm.tsx index bb56b28cb..b2ff99be1 100644 --- a/src/renderer/library/components/dialog/OpdsFeedUpdateForm.tsx +++ b/src/renderer/library/components/dialog/OpdsFeedUpdateForm.tsx @@ -58,7 +58,7 @@ class OpdsFeedUpdateForm extends React.Component {
- +
{__("opds.updateForm.title")} diff --git a/src/renderer/library/components/dialog/publicationInfos/PublicationInfo.tsx b/src/renderer/library/components/dialog/publicationInfos/PublicationInfo.tsx index acb503cc6..677c34d07 100644 --- a/src/renderer/library/components/dialog/publicationInfos/PublicationInfo.tsx +++ b/src/renderer/library/components/dialog/publicationInfos/PublicationInfo.tsx @@ -10,6 +10,7 @@ import * as stylesModals from "readium-desktop/renderer/assets/styles/components import * as stylesButtons from "readium-desktop/renderer/assets/styles/components/buttons.scss"; import * as Dialog from "@radix-ui/react-dialog"; +import * as VisuallyHidden from "@radix-ui/react-visually-hidden"; import * as React from "react"; import { DialogType, DialogTypeName } from "readium-desktop/common/models/dialog"; import * as dialogActions from "readium-desktop/common/redux/actions/dialog"; @@ -89,7 +90,10 @@ export const PublicationInfoLibWithRadixContent = React.forwardRef {/* */}
- + + + {__("catalog.bookInfo")} +
{/* {__("catalog.bookInfo")} */}

{__("catalog.bookInfo")}

@@ -160,7 +164,10 @@ export const PublicationInfoOpdsWithRadixContent = React.forwardRef {/* */}
- + + + {__("catalog.bookInfo")} +
{/* {__("catalog.bookInfo")} */}

{__("catalog.bookInfo")}

diff --git a/src/renderer/library/components/settings/Settings.tsx b/src/renderer/library/components/settings/Settings.tsx index 8d918482c..05a0a91b7 100644 --- a/src/renderer/library/components/settings/Settings.tsx +++ b/src/renderer/library/components/settings/Settings.tsx @@ -327,7 +327,7 @@ export const Settings: React.FC = () => {
- + diff --git a/src/renderer/reader/components/dialog/publicationInfos/PublicationInfo.tsx b/src/renderer/reader/components/dialog/publicationInfos/PublicationInfo.tsx index 0e70b3997..c96c3456d 100644 --- a/src/renderer/reader/components/dialog/publicationInfos/PublicationInfo.tsx +++ b/src/renderer/reader/components/dialog/publicationInfos/PublicationInfo.tsx @@ -9,6 +9,7 @@ import * as stylesModals from "readium-desktop/renderer/assets/styles/components import * as stylesButtons from "readium-desktop/renderer/assets/styles/components/buttons.scss"; import * as Dialog from "@radix-ui/react-dialog"; +import * as VisuallyHidden from "@radix-ui/react-visually-hidden"; import * as debug_ from "debug"; import * as React from "react"; import { DialogType, DialogTypeName } from "readium-desktop/common/models/dialog"; @@ -68,7 +69,10 @@ export const PublicationInfoReaderWithRadixContent = React.forwardRef {/* */}
- + + + {__("catalog.bookInfo")} +
{/* {__("catalog.bookInfo")} */}

{__("catalog.bookInfo")}