Testing

-moz-user-focus: Browser Support, Values, Alternatives

-moz-user-focus is a deprecated Mozilla-only CSS property supported in Firefox 2 to Firefox 121. Chrome, Safari, Edge, Opera, and IE never supported it.

Author

Prince Dewani

May 6, 2026

-moz-user-focus is a deprecated, non-standard Mozilla-specific CSS property that controlled whether an element could receive keyboard focus and whether it appeared in the tab order. It worked only in Firefox from Firefox 2 through Firefox 121, while Chrome, Edge, Safari, Opera, Samsung Internet, Internet Explorer, Android Browser, and Firefox for Android never supported it at all.

This guide covers what -moz-user-focus is, the browsers that support it, the valid values, the standard alternatives, and the known issues.

What is -moz-user-focus?

-moz-user-focus is a Mozilla-prefixed, non-standard CSS property that told Gecko whether an element could accept keyboard focus. It accepted normal, ignore, or none, and it was never part of any W3C specification. The W3C CSS Working Group rejected the predecessor user-focus proposal during the CSS3 UI draft phase.

Which browsers does -moz-user-focus support?

Only Firefox on desktop ever supported -moz-user-focus, and only from Firefox 2 to Firefox 121. Firefox 122 and later removed it, and no other browser engine ever shipped it.

Loading browser compatibility data...

-moz-user-focus compatibility in Chrome

Chrome does not support -moz-user-focus on any version, on any platform. Blink treats the rule as unknown and drops it during parsing, so a selector that sets -moz-user-focus: ignore has no effect on Chrome desktop, Chrome on Android, or Chrome on ChromeOS. Use tabindex="-1" or the inert attribute for cross-browser focus suppression.

-moz-user-focus compatibility in Edge

Microsoft Edge does not support -moz-user-focus. Both EdgeHTML 12 to 18 and every Chromium-based Edge from Edge 79 ignore the property because it was never part of the EdgeHTML or Blink engines. Switch to tabindex or inert for the same focus-skipping behavior on Edge.

-moz-user-focus compatibility in Firefox

Firefox supports -moz-user-focus from Firefox 2 through Firefox 121 on Windows, macOS, and Linux. Firefox 122 removed the property as part of the cleanup tracked in Bugzilla 1868552, so any current Firefox build ignores it. Firefox 1 and Firefox 1.5 did not support it either, because the property landed alongside the wider XUL focus rework in Firefox 2.

-moz-user-focus compatibility in Safari

Safari does not support -moz-user-focus on macOS or iOS. WebKit never implemented the Mozilla-prefixed rule, so any Safari version on iPhone, iPad, or Mac drops the declaration during CSS parsing. The accessible cross-platform replacements on Safari are tabindex="-1", the inert attribute, and the disabled attribute on form controls.

-moz-user-focus compatibility in Opera

Opera does not support -moz-user-focus on any version. The Presto-era Opera 9 to 12 used its own rendering engine and never adopted the Mozilla prefix, and every Chromium-based Opera from Opera 15 inherits Blink's behavior of ignoring the rule. Opera Mini and Opera Mobile also skip the declaration.

-moz-user-focus compatibility in Samsung Internet

Samsung Internet does not support -moz-user-focus. The browser tracks the same Chromium engine that Chrome for Android uses, so the Mozilla-prefixed rule never reaches the layout engine. Galaxy phones and tablets on every Samsung Internet release fall back to standard focus management with tabindex and inert.

-moz-user-focus compatibility in Android Browser

Android Browser does not support -moz-user-focus. Neither the legacy Android stock browser, the modern Android WebView, nor Firefox for Android ever shipped the rule, so any Android device drops the declaration. Use tabindex or inert for the same focus-skipping behavior on Android.

-moz-user-focus compatibility in Internet Explorer

Internet Explorer never supported -moz-user-focus on any version from IE 5.5 to IE 11. Trident is unrelated to Gecko and ignores the Mozilla prefix entirely. Microsoft has retired Internet Explorer, so production code can drop the IE branch and rely on tabindex for focus management.

Note

Note: -moz-user-focus only ever worked in Firefox and is gone from Firefox 122 onward. Test your focus-management fallbacks on real browsers and OS with TestMu AI. Try TestMu AI free!

What are the valid values of -moz-user-focus?

-moz-user-focus accepted three keyword values plus the standard CSS-wide keywords. Each keyword changed how Gecko routed keyboard focus and click activation for the matching element.

  • none: The initial value. The element refused keyboard focus, and selecting it stripped focus from any other element on the page. This was the default for elements that had no explicit -moz-user-focus rule.
  • normal: The element accepted keyboard focus and behaved like a normal focusable element in the tab order.
  • ignore: The element refused keyboard focus and was skipped in the tab sequence, but it did not strip focus from other elements when activated. This was the most common value used in real codebases.
  • inherit: The element copied the computed -moz-user-focus value from its parent.
  • initial: The element reset to the initial value, which is none.
  • unset: The element reset to inherit if -moz-user-focus is inherited, or to the initial value otherwise. Because -moz-user-focus is not inherited, unset behaved the same as initial.

What are the standard alternatives to -moz-user-focus?

Every -moz-user-focus use case has a standard, cross-browser replacement that works on Chrome, Edge, Firefox, Safari, and Opera. Pick the alternative that matches the focus rule you were targeting.

  • tabindex="-1": The HTML attribute that removes an element from the sequential tab order while still allowing programmatic focus through element.focus(). It is the direct replacement for -moz-user-focus: ignore.
  • inert attribute: The HTML attribute that makes an element and its entire subtree unfocusable, unclickable, and invisible to assistive technology. It is the cleanest replacement when you need to disable a whole region.
  • disabled attribute: The HTML attribute on form controls like button, input, select, and textarea. It blocks focus, blocks pointer events, and reflects the disabled state to assistive technology.
  • pointer-events: none: The CSS property that blocks mouse and touch activation. Pair it with tabindex="-1" to also remove keyboard focus, since pointer-events alone does not change tab order.
  • aria-hidden="true": The ARIA attribute that hides an element from accessibility trees. Combine it with inert or tabindex="-1" because aria-hidden alone does not block focus.
  • JavaScript focus management: A blur() call inside a focus event listener mirrors the original -moz-user-focus: none behavior of refusing focus on every interaction.

Here is a side-by-side migration from a Firefox-only -moz-user-focus rule to a cross-browser equivalent that works on every modern engine:

/* Legacy Firefox-only rule. Worked in Firefox 2 to 121. */
.skip-focus {
  -moz-user-focus: ignore;
}

/* Cross-browser replacement. Works everywhere. */
<button class="skip-focus" tabindex="-1">Not focusable</button>

/* Or, to skip a whole subtree: */
<div inert>
  <button>Not focusable</button>
  <input type="text" placeholder="Not focusable" />
</div>
...

What are the known issues with -moz-user-focus?

Most -moz-user-focus problems come from the same root cause: it only ever worked in Firefox, and now it does not work even there. The issues below catch the surprises that real codebases hit during the migration.

  • Silent removal in Firefox 122: Firefox 122 dropped the property without a console warning, so a UI that relied on -moz-user-focus: ignore to skip a custom widget suddenly becomes focusable on current Firefox builds. Bugzilla 1871745 tracked the regression that surfaced this for inputs.
  • Never worked outside Firefox: Any rule that targets -moz-user-focus has always been dead on Chrome, Edge, Safari, Opera, Samsung Internet, and Internet Explorer. A developer testing only on Firefox can ship a focus bug that lands the moment a user opens the page on Chrome.
  • No automatic fallback to standard properties: Browsers do not map -moz-user-focus: ignore to tabindex="-1" automatically. The HTML attribute and the CSS rule live in different layers, so the migration has to be explicit.
  • Conflicts with inert and tabindex: Stacking -moz-user-focus: ignore on top of inert or tabindex="-1" inside Firefox 121 produced conflicting focus paths and edge cases that varied by element type, which is part of why Mozilla cleaned the property out.
  • XUL leak into HTML: -moz-user-focus was originally a XUL-only concept that leaked into HTML through Gecko's shared style system. Many of the documented quirks came from XUL-specific behavior that never made sense on HTML elements.
  • Linting tools still flag it: stylelint and ESLint stylelint-config-recommended both still permit -moz-user-focus by default. Add a custom rule that bans the property to keep dead Firefox-only CSS out of new code.

In my experience, the cleanest way to migrate a legacy codebase is a single grep for -moz-user-focus across every CSS file, then swap each match for tabindex="-1" or inert based on whether the rule was ignore or none. The HTML attribute path is more reliable than any CSS approach, because it survives the Firefox 122 removal and works on every other browser at the same time.

...

Citations

All -moz-user-focus version numbers and platform notes in this guide come from these primary sources:

Author

Prince Dewani is a Community Contributor at TestMu AI, where he manages content strategies around software testing, QA, and test automation. He is certified in Selenium, Cypress, Playwright, Appium, Automation Testing, and KaneAI. Prince has also presented academic research at the international conference PBCON-01. He further specializes in on-page SEO, bridging marketing with core testing technologies. On LinkedIn, he is followed by 4,300+ QA engineers, developers, DevOps experts, tech leaders, and AI-focused practitioners in the global testing community.

Open in ChatGPT Icon

Open in ChatGPT

Open in Claude Icon

Open in Claude

Open in Perplexity Icon

Open in Perplexity

Open in Grok Icon

Open in Grok

Open in Gemini AI Icon

Open in Gemini AI

Copied to Clipboard!
...

3000+ Browsers. One Platform.

See exactly how your site performs everywhere.

Try it free
...

Write Tests in Plain English with KaneAI

Create, debug, and evolve tests using natural language.

Try for free

Frequently asked questions

Did you find this page helpful?

More Related Hubs

TestMu AI forEnterprise

Get access to solutions built on Enterprise
grade security, privacy, & compliance

  • Advanced access controls
  • Advanced data retention rules
  • Advanced Local Testing
  • Premium Support options
  • Early access to beta features
  • Private Slack Channel
  • Unlimited Manual Accessibility DevTools Tests