cyberangles blog

How to Change Accesskey Modifier Keys in Firefox: Resolve Alt+Shift vs Alt Browser Conflicts for Buttons

Accesskeys are keyboard shortcuts that simplify navigation on websites by allowing users to quickly interact with buttons, links, and other elements without using a mouse. They are especially valuable for users relying on keyboard navigation or assistive technologies. However, a common frustration arises when Firefox’s default accesskey modifier conflicts with website-specific shortcuts—specifically, the clash between Firefox’s Alt+Shift modifier and websites designed to use Alt alone.

If you’ve ever pressed Alt+[Key] (e.g., Alt+S for "Submit") on a website, only to have Firefox open a browser menu instead of triggering the site’s action, you’ve encountered this conflict. This blog post will guide you through resolving this issue by customizing Firefox’s accesskey modifier keys, ensuring website shortcuts work as intended.

2026-01

Table of Contents#

  1. Understanding Accesskeys and Modifier Conflicts
  2. Why Firefox Uses Alt+Shift by Default
  3. Step-by-Step Guide to Changing Accesskey Modifier Keys
  4. Troubleshooting Common Issues
  5. Conclusion
  6. References

Understanding Accesskeys and Modifier Conflicts#

What Are Accesskeys?#

Accesskeys are defined using the HTML accesskey attribute, which assigns a keyboard shortcut to an element (e.g., <button accesskey="s">Submit</button>). When combined with a modifier key (e.g., Alt, Ctrl), they let users trigger actions like clicking a button or navigating to a link with a single keystroke.

Modifier Keys: The Source of Conflict#

Modifier keys (e.g., Alt, Ctrl, Shift) "modify" the behavior of other keys. Browsers and operating systems reserve certain modifier combinations for built-in shortcuts (e.g., Alt+F opens Firefox’s "File" menu).

The conflict arises because:

  • Websites often design accesskeys to use Alt alone (e.g., Alt+S for "Submit").
  • Firefox defaults to Alt+Shift as the modifier for website accesskeys to avoid overriding its own browser-level shortcuts (e.g., Alt for menus).

This mismatch means pressing Alt+S on a site may trigger Firefox’s menu instead of the website’s button—frustrating users expecting the site’s shortcut to work.

Why Firefox Uses Alt+Shift by Default#

Firefox prioritizes avoiding conflicts with system and browser-level shortcuts. The Alt key has long been reserved for navigating application menus (e.g., "File," "Edit," "View" in Firefox). Using Alt alone for website accesskeys would risk overriding these critical shortcuts, leading to a broken user experience.

To balance this, Firefox uses Alt+Shift as the default modifier for website accesskeys. While this prevents browser shortcut conflicts, it breaks compatibility with websites that rely on Alt alone.

Step-by-Step Guide to Changing Accesskey Modifier Keys#

Firefox does not expose accesskey modifier settings in its regular GUI, so we’ll use about:config—a powerful settings editor—to adjust this behavior. Follow these steps carefully:

Step 1: Open Firefox’s Advanced Settings (about:config)#

  1. Launch Firefox.
  2. In the address bar, type about:config and press Enter.

Step 2: Accept the Warning#

Firefox will display a warning: "This might void your warranty!" (a lighthearted note about potential risks). Click Accept the Risk and Continue to proceed.

Step 3: Search for the Accesskey Modifier Preference#

In the search bar at the top of the about:config page, type:

ui.key.contentAccessKey  

This preference controls the modifier key for accesskeys on web content (websites).

Step 4: Modify the Preference Value#

  • The default value for ui.key.contentAccessKey is 5, which corresponds to Alt+Shift (Firefox’s default modifier).
  • To resolve the Alt conflict, we’ll change this to 1 (which sets Alt as the sole modifier).

How to change the value:

  1. Double-click the ui.key.contentAccessKey entry. A text box will appear.
  2. Delete the default value (5) and type 1.
  3. Press Enter to save the change.

Step 5: Verify the Change#

  1. Close and restart Firefox to apply the new setting.
  2. Test a website with Alt-based accesskeys (e.g., find a site with a button labeled "Submit (Alt+S)").
  3. Press Alt+[Key] (e.g., Alt+S). The website’s action should now trigger instead of a Firefox menu.

Modifier Key Values Reference#

If Alt alone causes new conflicts (e.g., overriding Firefox menus), use these values to choose a different modifier:

ValueModifier Combination
0Ctrl
1Alt (Recommended for Alt-based sites)
2Shift
3Ctrl+Shift
4Ctrl+Alt
5Alt+Shift (Default)
6Ctrl+Alt+Shift

Troubleshooting Common Issues#

Issue 1: The ui.key.contentAccessKey Preference Is Missing#

If you can’t find ui.key.contentAccessKey in about:config:

  • Update Firefox: Older versions may use a different preference name. Update to the latest Firefox release.
  • Check for Typos: Ensure you typed the preference name correctly (no spaces, case-sensitive: ui.key.contentAccessKey).

Issue 2: Shortcuts Still Don’t Work#

  • Restart Firefox: Changes to about:config often require a restart to take effect.
  • Test with a Known Accesskey: Use a test page like MDN’s accesskey demo to verify if the modifier works.

Issue 3: New Conflicts with Browser Shortcuts#

If Alt+[Key] now overrides Firefox menus (e.g., Alt+F fails to open "File"):

  • Revert to Alt+Shift (value 5) or try a different modifier (e.g., Ctrl+Alt with value 4).

Conclusion#

By adjusting Firefox’s ui.key.contentAccessKey preference in about:config, you can resolve conflicts between Alt+Shift and Alt-based accesskeys. This simple tweak ensures website shortcuts work as intended, improving accessibility and navigation speed.

Recap: Open about:config → Search for ui.key.contentAccessKey → Change its value to 1 (for Alt) → Restart Firefox.

Experiment with modifier values to find the best balance for your workflow!

References#