From 614a469ffc88a8c32adc8527b9e8b1b2ebcfc8d9 Mon Sep 17 00:00:00 2001 From: Remko Huisman <43807324+remko48@users.noreply.github.com> Date: Mon, 16 Oct 2023 09:04:57 +0200 Subject: [PATCH] Revert "feature/XW-87/select-WCAG" --- README.md | 1 - package.json | 2 +- src/components/formFields/select/select.tsx | 58 --------------------- 3 files changed, 1 insertion(+), 60 deletions(-) diff --git a/README.md b/README.md index 79eb111..ab772f4 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,6 @@ - **Version 2.2 (breaking changes from 2.1.x)** - - 2.2.12: Updated Select components to WCAG with aria-label and role. - 2.2.11: Updated Primary and Secondary topnav to NLDS. - 2.2.10: Added z-index to tooltip. - 2.2.9: Added CardWrapper, CardHeader, CardHeaderTitle, CardHeaderDate to index. diff --git a/package.json b/package.json index 77db6a1..cc6cd0e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@conduction/components", - "version": "2.2.12", + "version": "2.2.11", "description": "React (Gatsby) components used within the Conduction Skeleton Application (and its implementations)", "main": "lib/index.js", "scripts": { diff --git a/src/components/formFields/select/select.tsx b/src/components/formFields/select/select.tsx index 9646eb7..853b833 100644 --- a/src/components/formFields/select/select.tsx +++ b/src/components/formFields/select/select.tsx @@ -11,7 +11,6 @@ interface ISelectProps { control: Control; options: { label: string; value: string }[]; name: string; - ariaLabel?: string; id?: string; defaultValue?: any; disabled?: boolean; @@ -73,25 +72,7 @@ export const SelectMultiple = ({ hideErrorMessage, menuPlacement, placeholder, - ariaLabel, }: ISelectProps & IReactHookFormProps): JSX.Element => { - React.useEffect(() => { - document.querySelectorAll('[id*="live-region"]').forEach((element: any) => { - if (element?.role !== "presentation") { - element.setAttribute("role", "presentation"); - } - }); - document.querySelectorAll('[class*="indicatorSeparator"]').forEach((element: any) => { - if (element.role !== "presentation") { - element.setAttribute("role", "presentation"); - } - }); - document.querySelectorAll('[class*="a11yText-A11yText"]').forEach((element: any) => { - if (element.role !== "presentation") { - element.setAttribute("role", "presentation"); - } - }); - }, []); return ( { - React.useEffect(() => { - document.querySelectorAll('[id*="live-region"]').forEach((element: any) => { - if (element.role !== "presentation") { - element.setAttribute("role", "presentation"); - } - }); - document.querySelectorAll('[class*="indicatorSeparator"]').forEach((element: any) => { - if (element.role !== "presentation") { - element.setAttribute("role", "presentation"); - } - }); - document.querySelectorAll('[class*="a11yText-A11yText"]').forEach((element: any) => { - if (element.role !== "presentation") { - element.setAttribute("role", "presentation"); - } - }); - }, []); return ( { - React.useEffect(() => { - document.querySelectorAll('[id*="live-region"]').forEach((element: any) => { - if (element.role !== "presentation") { - element.setAttribute("role", "presentation"); - } - }); - document.querySelectorAll('[class*="indicatorSeparator"]').forEach((element: any) => { - if (element.role !== "presentation") { - element.setAttribute("role", "presentation"); - } - }); - document.querySelectorAll('[class*="a11yText-A11yText"]').forEach((element: any) => { - if (element.role !== "presentation") { - element.setAttribute("role", "presentation"); - } - }); - }, []); return (