From 5f409125c60cf183527dda52380a89b892f036c0 Mon Sep 17 00:00:00 2001 From: Alexey Date: Mon, 11 Nov 2024 14:32:00 +0100 Subject: [PATCH 1/3] fix(Popover): use visible title for popup a11y label --- src/components/Popover/Popover.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/Popover/Popover.tsx b/src/components/Popover/Popover.tsx index 8461e5e836..92f25d0da6 100644 --- a/src/components/Popover/Popover.tsx +++ b/src/components/Popover/Popover.tsx @@ -4,6 +4,7 @@ import React from 'react'; import {Xmark} from '@gravity-ui/icons'; +import {useUniqId} from '../../hooks/useUniqId' import {Button} from '../Button'; import {Icon} from '../Icon'; import type {PopupPlacement} from '../Popup'; @@ -115,6 +116,8 @@ export const Popover = React.forwardRef - {title &&

{title}

} + {title &&

{title}

} Date: Mon, 11 Nov 2024 14:38:10 +0100 Subject: [PATCH 2/3] chore: lint --- src/components/Popover/Popover.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/Popover/Popover.tsx b/src/components/Popover/Popover.tsx index 92f25d0da6..437b6a931a 100644 --- a/src/components/Popover/Popover.tsx +++ b/src/components/Popover/Popover.tsx @@ -4,7 +4,7 @@ import React from 'react'; import {Xmark} from '@gravity-ui/icons'; -import {useUniqId} from '../../hooks/useUniqId' +import {useUniqId} from '../../hooks/useUniqId'; import {Button} from '../Button'; import {Icon} from '../Icon'; import type {PopupPlacement} from '../Popup'; @@ -150,7 +150,9 @@ export const Popover = React.forwardRef - {title &&

{title}

} + {title && ( +

{title}

+ )} Date: Mon, 11 Nov 2024 14:41:33 +0100 Subject: [PATCH 3/3] chore: lint --- src/components/Popover/Popover.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/Popover/Popover.tsx b/src/components/Popover/Popover.tsx index 437b6a931a..d6d7087be9 100644 --- a/src/components/Popover/Popover.tsx +++ b/src/components/Popover/Popover.tsx @@ -151,7 +151,9 @@ export const Popover = React.forwardRef {title && ( -

{title}

+

+ {title} +

)}