#57766·ant-design

Menu not setting focus to link in first menu item containig link when navigating with keyboard

Author: kpustakhodCreated Apr 24, 2026Updated Sep 28, 2026
Labels🐛 BugInactive⌨️ Accessibility

Reproduction link

Edit on StackBlitz

Steps to reproduce

  1. Create a DropdownButton component with menu where all items are links (check code block below).
  2. Add autoFocus prop to DrodownButton (this ctep can be skipped, otherwise you just need to focus to menu manually with Tab key).
  3. Focus with keyboard on DropdownButton, press enter.
  4. Menu opens, focus on menu (if not using autoFocus)
  5. Fist menu item is focused. Press Enter.
bash
import React from 'react';

import type { MenuProps } from 'antd';
import { Button, Dropdown, Space } from 'antd';

const items: MenuProps['items'] = [
  {
    key: '1',
    label: (
      <a
        target="_blank"
        rel="noopener noreferrer"
        href="https://www.antgroup.com"
      >
        1st menu item
      </a>
    ),
  },
  {
    key: '2',
    label: (
      <a
        target="_blank"
        rel="noopener noreferrer"
        href="https://www.aliyun.com"
      >
        2nd menu item
      </a>
    ),
  },
  {
    key: '3',
    label: (
      <a
        target="_blank"
        rel="noopener noreferrer"
        href="https://www.luohanacademy.com"
      >
        3rd menu item
      </a>
    ),
  },
];

const App: React.FC = () => (
  <Space vertical>
    <Space wrap>
      <Dropdown trigger={['click']} menu={{ items }}>
        <Button>Menu with links</Button>
      </Dropdown>
    </Space>
  </Space>
);

export default App;

What is expected?

User should be navigated to url from html link.

What is actually happening?

Menu closes, navigation not happening.

Environment Info
antd 6.3.6
React React 19
System iOS 26.3.1 (a)
Browser Chrome 146.0.7680.80

Currently focus is set on menu item container, and if menu item contains link, it is not possible to follow by link url with keyboard.