From ae5a3ce124538a30a614b83f6fd81a0fdd78c769 Mon Sep 17 00:00:00 2001 From: Ken Gullaksen Date: Mon, 27 Nov 2023 11:08:23 +0100 Subject: [PATCH] Tag 2215 a11y fixes (#128) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fiks manglende id på dropdown referert til via aria-controls * bump patch version --- package-lock.json | 4 ++-- package.json | 2 +- src/bedriftsmeny/velger/Dropdown.tsx | 5 +++-- src/bedriftsmeny/velger/Virksomhetsvelger.tsx | 1 + 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index ff5d1c4..5ddb8b8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@navikt/bedriftsmeny", - "version": "6.12.0", + "version": "6.12.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@navikt/bedriftsmeny", - "version": "6.12.0", + "version": "6.12.1", "license": "MIT", "dependencies": { "focus-trap-react": "^10.2.2", diff --git a/package.json b/package.json index 5736676..3c0f689 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@navikt/bedriftsmeny", - "version": "6.12.0", + "version": "6.12.1", "description": "Bedriftsvelger og -meny for innlogget arbeidsgiver. Laget av TAG (Tjenester for Arbeidsgivere).", "author": "NAVIKT", "license": "MIT", diff --git a/src/bedriftsmeny/velger/Dropdown.tsx b/src/bedriftsmeny/velger/Dropdown.tsx index 5b3f41a..816e619 100644 --- a/src/bedriftsmeny/velger/Dropdown.tsx +++ b/src/bedriftsmeny/velger/Dropdown.tsx @@ -1,17 +1,18 @@ import React from "react"; -interface Props { +interface Props extends React.HTMLAttributes { children: React.ReactNode, ariaLabel: string, friKomponent: boolean, erApen: boolean, } -const Dropdown = ({erApen, ariaLabel, friKomponent, children}: Props) => { +const Dropdown = ({erApen, ariaLabel, friKomponent, children, ...divProperties}: Props) => { return erApen ?
{children}
: null diff --git a/src/bedriftsmeny/velger/Virksomhetsvelger.tsx b/src/bedriftsmeny/velger/Virksomhetsvelger.tsx index 1c76abd..d72c469 100644 --- a/src/bedriftsmeny/velger/Virksomhetsvelger.tsx +++ b/src/bedriftsmeny/velger/Virksomhetsvelger.tsx @@ -94,6 +94,7 @@ const Velger = ({friKomponent} : {friKomponent: boolean} ) => {