diff --git a/ts/axo/AxoDropdownMenu.dom.tsx b/ts/axo/AxoDropdownMenu.dom.tsx index 216683078a..fcbf54e7b9 100644 --- a/ts/axo/AxoDropdownMenu.dom.tsx +++ b/ts/axo/AxoDropdownMenu.dom.tsx @@ -1,25 +1,12 @@ // Copyright 2025 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only -import { - memo, - useCallback, - useEffect, - useId, - useMemo, - useRef, - useState, -} from 'react'; +import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react'; import { DropdownMenu } from 'radix-ui'; import type { FC, ReactNode } from 'react'; import { computeAccessibleName } from 'dom-accessibility-api'; import { AxoSymbol } from './AxoSymbol.dom.tsx'; import { AxoBaseMenu } from './_internal/AxoBaseMenu.dom.tsx'; import { tw } from './tw.dom.tsx'; -import { - AriaLabellingProvider, - useAriaLabellingContext, - useCreateAriaLabellingContext, -} from './_internal/AriaLabellingContext.dom.tsx'; import { assert } from './_internal/assert.std.tsx'; import { getElementAriaRole, @@ -32,6 +19,7 @@ import { import { isTestOrMockEnvironment } from '../environment.std.ts'; import { AxoDragRegion } from './AxoDragRegion.dom.tsx'; import { AxoTheme } from './AxoTheme.dom.tsx'; +import { AriaLabelled } from './aria/AriaLabelled.dom.tsx'; const { useDisableDragRegions } = AxoDragRegion; @@ -218,28 +206,25 @@ export namespace AxoDropdownMenu { * Uses a portal to render the content part into the `body`. */ export const Content: FC = memo(props => { - const { context, labelId, descriptionId } = useCreateAriaLabellingContext(); const { open } = useStrictContext(RootContext); return ( - - - + + + {props.children} - - - + + + ); }); @@ -396,30 +381,19 @@ export namespace AxoDropdownMenu { * for the containing menu. */ export const Header: FC = memo(props => { - const labelId = useId(); - const descriptionId = useId(); - - const { labelRef, descriptionRef } = useAriaLabellingContext( - 'AxoDropdownMenu.Content/SubContent' - ); - return (