<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/basic-keyboard-shortcut-support-for-focused-links-by55w9vuh" -->

---
title: Basic keyboard shortcut support for focused links
description: A detailed cross-browser, cross-platform reference documents how anchor elements respond to keyboard shortcuts (Shift, Function, Control, Option, Alt, Command...
canonical: https://daily.dev/posts/basic-keyboard-shortcut-support-for-focused-links-by55w9vuh
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Basic keyboard shortcut support for focused links | daily.dev
og:description: A detailed cross-browser, cross-platform reference documents how anchor elements respond to keyboard shortcuts (Shift, Function, Control, Option, Alt, Command...
og:url: https://daily.dev/posts/basic-keyboard-shortcut-support-for-focused-links-by55w9vuh
og:image: https://api.daily.dev/og/posts/bY55w9vUh.png
og:image:alt: Basic keyboard shortcut support for focused links
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Basic keyboard shortcut support for focused links

**[Eric Bailey](https://daily.dev/sources/ericwbailey)** · 6 min read · 0 upvotes · 0 comments

## Summary

A detailed cross-browser, cross-platform reference documents how anchor elements respond to keyboard shortcuts (Shift, Function, Control, Option, Alt, Command + Enter) when focused, tested across Windows, macOS, iOS, and Android on Blink, Gecko, and WebKit engines. The behavior varies significantly by OS and browser engine — some open new tabs, some download URLs, some do nothing. The exercise was prompted by the need to recreate link behavior in JavaScript for synthetic (non-semantic) links, and the piece ultimately argues for using native anchor elements instead of reimplementing this complex, undocumented behavior in JavaScript, which is tedious, error-prone, and hard to fully replicate.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://ericwbailey.website/published/basic-keyboard-shortcut-support-for-focused-links>

## Questions this post answers

### What happens when you press Control+Enter on a focused link in Chrome on Windows versus macOS?

On Windows, Control+Enter opens the URL in a new tab in both Blink and Gecko browsers. On macOS, Control+Enter instead opens the URL in the current tab in Blink and WebKit, while Gecko does nothing. Testing was done with Chrome 127.0.6533.120 and Firefox 129.0.1 on Windows 22631.4307 and macOS 14.5.

_Developers building custom link components can track browser quirks like these through daily.dev before they cause support tickets._

### Does Option+Enter or Alt+Enter download a link on Safari for iOS?

On iOS Safari, Option+Enter downloads the URL, while Alt+Enter does nothing. This differs from macOS Safari, where both Option+Enter and Alt+Enter download the URL. Testing was performed on iOS 17.5.1 with Safari 17.6, requiring full keyboard access to be enabled on the device.

_Anyone reverse-engineering native link behavior for accessibility work can follow findings like this on daily.dev._

### Why should I avoid recreating anchor tag behavior with JavaScript for custom link components?

Recreating anchor tag keyboard behavior in JavaScript is impractical because the full set of interactions—like opening in a new tab, downloading, or adding to a reading list—varies by browser engine, operating system, and even keyboard hardware, and some behaviors like native context menus cannot be replicated at all. Using the native HTML anchor element provides this functionality automatically without ongoing maintenance burden.

_Teams weighing custom components against native HTML elements can find this kind of accessibility tradeoff analysis on daily.dev._

## Similar posts on daily.dev

- [A Beginner’s Guide to Manual Accessibility Testing with Keyboard Navigation](https://daily.dev/posts/a-beginner-s-guide-to-manual-accessibility-testing-with-keyboard-navigation-wgi3xgzdt) · SitePoint · 0 upvotes · 0 comments
- [430: The Wild World of Keyboard Shortcuts in Web Apps](https://daily.dev/posts/430-the-wild-world-of-keyboard-shortcuts-in-web-apps-nkahwojxm) · CodePen · 3 upvotes · 0 comments
- [Keyboard Shortcuts That Display The Correct Modifier Key per OS – Master.dev Blog](https://daily.dev/posts/keyboard-shortcuts-that-display-the-correct-modifier-key-per-os-master-dev-blog-dzveifmsr) · Frontend Masters · 2 upvotes · 1 comments
- [Show keystrokes on a website with the <show-keystrokes> custom element](https://daily.dev/posts/show-keystrokes-on-a-website-with-the-show-keystrokes-custom-element-nwr24wrlz) · Bram.us · 2 upvotes · 0 comments
- [I've been using Windows Explorer for years, and I wish I had known about these 7 shortcuts sooner](https://daily.dev/posts/i-ve-been-using-windows-explorer-for-years-and-i-wish-i-had-known-about-these-7-shortcuts-sooner-7olcrqoaa) · XDA Developers · 0 upvotes · 0 comments

---

Tags: [#javascript](https://daily.dev/tags/javascript), [#html](https://daily.dev/tags/html), [#accessibility](https://daily.dev/tags/accessibility)

[View this post on daily.dev](https://daily.dev/posts/basic-keyboard-shortcut-support-for-focused-links-by55w9vuh)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Basic keyboard shortcut support for focused links","url":"https://daily.dev/posts/basic-keyboard-shortcut-support-for-focused-links-by55w9vuh","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/basic-keyboard-shortcut-support-for-focused-links-by55w9vuh"},"datePublished":"2026-09-20T07:43:59.214Z","dateModified":"2026-09-20T07:45:27.343Z","description":"A detailed cross-browser, cross-platform reference documents how anchor elements respond to keyboard shortcuts (Shift, Function, Control, Option, Alt, Command...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/883ff60c957f3f781c4fa0904bc98b88?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/883ff60c957f3f781c4fa0904bc98b88?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Eric Bailey","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Eric Bailey","logo":"https://media.daily.dev/image/upload/s--r1vwe6z1--/f_auto,q_auto/v1789890198/logos/ericwbailey?_a=BAMAMicg0","url":"https://daily.dev/sources/ericwbailey"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/basic-keyboard-shortcut-support-for-focused-links-by55w9vuh","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"javascript,html,accessibility","timeRequired":"PT6M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Eric Bailey","item":"https://daily.dev/sources/ericwbailey"},{"@type":"ListItem","position":3,"name":"Basic keyboard shortcut support for focused links"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/basic-keyboard-shortcut-support-for-focused-links-by55w9vuh#faq","mainEntity":[{"@type":"Question","name":"What happens when you press Control+Enter on a focused link in Chrome on Windows versus macOS?","acceptedAnswer":{"@type":"Answer","text":"On Windows, Control+Enter opens the URL in a new tab in both Blink and Gecko browsers. On macOS, Control+Enter instead opens the URL in the current tab in Blink and WebKit, while Gecko does nothing. Testing was done with Chrome 127.0.6533.120 and Firefox 129.0.1 on Windows 22631.4307 and macOS 14.5. Developers building custom link components can track browser quirks like these through daily.dev before they cause support tickets."}},{"@type":"Question","name":"Does Option+Enter or Alt+Enter download a link on Safari for iOS?","acceptedAnswer":{"@type":"Answer","text":"On iOS Safari, Option+Enter downloads the URL, while Alt+Enter does nothing. This differs from macOS Safari, where both Option+Enter and Alt+Enter download the URL. Testing was performed on iOS 17.5.1 with Safari 17.6, requiring full keyboard access to be enabled on the device. Anyone reverse-engineering native link behavior for accessibility work can follow findings like this on daily.dev."}},{"@type":"Question","name":"Why should I avoid recreating anchor tag behavior with JavaScript for custom link components?","acceptedAnswer":{"@type":"Answer","text":"Recreating anchor tag keyboard behavior in JavaScript is impractical because the full set of interactions—like opening in a new tab, downloading, or adding to a reading list—varies by browser engine, operating system, and even keyboard hardware, and some behaviors like native context menus cannot be replicated at all. Using the native HTML anchor element provides this functionality automatically without ongoing maintenance burden. Teams weighing custom components against native HTML elements can find this kind of accessibility tradeoff analysis on daily.dev."}}]}
```

