Skip to content

Fix button focus on firefox tu use native focus#472

Merged
cedric07 merged 1 commit intomasterfrom
fix/focus-firefox
Feb 6, 2026
Merged

Fix button focus on firefox tu use native focus#472
cedric07 merged 1 commit intomasterfrom
fix/focus-firefox

Conversation

@cedric07
Copy link
Contributor

@cedric07 cedric07 commented Feb 6, 2026

Suite à un retour de Temesis, les focus des boutons sur fixefox sont dégradés et pas assez épais en vue de la MAJ du RGAA incluant WCAG 2.2.

On garde le focus natif navigateur comme c'est déjà le cas pour tout le reste

Capture d’écran 2026-02-06 à 11 25 45

Capture d’écran 2026-02-06 à 11 27 07

Summary by Sourcery

Bug Fixes:

  • Remove custom Firefox button focus outline so that native, thicker focus styling is restored.

@sourcery-ai
Copy link

sourcery-ai bot commented Feb 6, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Removes custom Firefox-specific button focus outlines so that Firefox uses its native focus styles for buttons, aligning button focus behavior with the rest of the application for better accessibility and consistency.

Flow diagram for Firefox button focus styling decision

flowchart TD
  A[Button_in_Firefox_receives_focus] --> B{Browser_applies_focus_style}
  B --> C[Native_Firefox_focus_style]

  subgraph Previous_behavior
    D[Normalize_SCSS] --> E[Firefox_specific_rule
outline 1px dotted ButtonText]
    A --> D
    E -.overrides.-> C
  end

  subgraph New_behavior
    F[Removed_Firefox_specific_focus_rule]
    A --> G[No_custom_outline_for_Firefox]
    G --> C
  end
Loading

File-Level Changes

Change Details Files
Stop overriding Firefox's native focus outline for buttons to improve focus visibility and consistency.
  • Remove the CSS rule that restored a custom 1px dotted outline on :-moz-focusring for button and button-type inputs
  • Rely on remaining normalize rules that only strip inner borders without redefining focus outline
src/scss/03-base/_normalize.scss

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • Since this change intentionally relies on the native Firefox focus outline, consider adding a short comment in _normalize.scss near the removed rule to document the accessibility rationale and avoid future reintroduction of custom outlines.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Since this change intentionally relies on the native Firefox focus outline, consider adding a short comment in `_normalize.scss` near the removed rule to document the accessibility rationale and avoid future reintroduction of custom outlines.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link
Contributor

@MarieComet MarieComet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lezgo

@cedric07 cedric07 merged commit ed363aa into master Feb 6, 2026
7 checks passed
@cedric07 cedric07 deleted the fix/focus-firefox branch February 6, 2026 10:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants