From 87c96e03d2ed111b7450aa2edc3fe4b7e63e8a59 Mon Sep 17 00:00:00 2001 From: mitchellwarr Date: Mon, 28 Nov 2022 16:18:12 +1300 Subject: [PATCH] live-announcer incorrectly copies visually hidden styles Issue here: https://github.com/adobe/react-spectrum/issues/3791 Object.assign node.style does not accept 1 as a value for width and height; it requires '1px' --- packages/@react-aria/live-announcer/src/LiveAnnouncer.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/@react-aria/live-announcer/src/LiveAnnouncer.tsx b/packages/@react-aria/live-announcer/src/LiveAnnouncer.tsx index 37bc82aca16..a35d182784d 100644 --- a/packages/@react-aria/live-announcer/src/LiveAnnouncer.tsx +++ b/packages/@react-aria/live-announcer/src/LiveAnnouncer.tsx @@ -70,12 +70,12 @@ class LiveAnnouncer { border: 0, clip: 'rect(0 0 0 0)', clipPath: 'inset(50%)', - height: 1, + height: '1px', margin: '0 -1px -1px 0', overflow: 'hidden', padding: 0, position: 'absolute', - width: 1, + width: '1px', whiteSpace: 'nowrap' });