What could be causing the issue where Safari shows an outline around linked sections on my Webflow site?

TL;DR
  • Identify Cause: Default focus styles ensure accessibility, but Safari might render them differently.
  • Implement Solution: Add custom CSS via Webflow's Project Settings to remove or adjust focus outlines, ensuring accessibility.
  • Cross-Browser Testing: Check changes in all major browsers to ensure consistency.
  • Enhance Accessibility: Replace default outlines with custom styles if needed to maintain visible focus indicators.

Safari might show an outline around linked sections on your Webflow site due to default focus styles for accessibility. Here's how to address it.

1. Understand the Cause

  • Focus outlines are often applied to ensure accessibility, helping users navigate using keyboards.
  • Safari may uniquely render these outlines compared to other browsers.

2. Use Custom CSS to Remove Outline

  • Add a custom CSS rule in your Webflow project to manage or remove outlines.
  • Go to Project Settings and navigate to Custom Code.
  • Within the Inside Head Tag section, enter:

    ```css

    a:focus {

      outline: none;

    }

    ```

  • Remember that accessibility is crucial; removing outlines entirely might impede some users' experience. Consider using alternative focus styles instead of complete removal.

3. Test Across Browsers

  • Ensure that any changes work well across all popular browsers.
  • After applying the CSS, review your site in Safari, Chrome, Firefox, and Edge to confirm consistent behavior and appearance.

4. Consider Accessibility

  • If accessibility remains a concern, replace default outlines with custom focus styles, ensuring visible focus indicators for all users:

  

  ```css

  a:focus {

    outline: 2px solid #ffcc00; / Example of a custom focus outline /

  }

  ```

Summary

Safari displays outlines for accessibility; use custom CSS to manage this. Ensure any changes maintain or enhance accessibility for keyboard users.

Rate this answer

Other Webflow Questions