Skip to content

Commit

Permalink
Merge 55ec727 into 0bb339e
Browse files Browse the repository at this point in the history
  • Loading branch information
KenAJoh authored Oct 25, 2023
2 parents 0bb339e + 55ec727 commit bfb154e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/pink-suits-destroy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@navikt/ds-react": patch
---

Accordion: Fikset dom-validering ved bruk av `div` i `button`.
6 changes: 3 additions & 3 deletions @navikt/core/react/src/accordion/AccordionHeader.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { ChevronDownIcon } from "@navikt/aksel-icons";
import cl from "clsx";
import React, { forwardRef, useContext } from "react";
import { Heading } from "../typography";
import { AccordionContext } from "./AccordionContext";
import { AccordionItemContext } from "./AccordionItem";
import { ChevronDownIcon } from "@navikt/aksel-icons";

export interface AccordionHeaderProps
extends React.ButtonHTMLAttributes<HTMLButtonElement> {
Expand Down Expand Up @@ -37,13 +37,13 @@ const AccordionHeader = forwardRef<HTMLButtonElement, AccordionHeaderProps>(
aria-expanded={itemContext.open}
type="button"
>
<div className="navds-accordion__icon-wrapper">
<span className="navds-accordion__icon-wrapper">
<ChevronDownIcon
className="navds-accordion__header-chevron"
title="Vis mer"
aria-hidden
/>
</div>
</span>
<Heading
size={accordionContext?.headingSize ?? "small"}
as="span"
Expand Down

0 comments on commit bfb154e

Please sign in to comment.