Skip to content

A active does not account for search params #518

Description

@Akkuma

Describe the bug

A list of links that are used for filtering content will result in all of them having an active class and all of them having aria-current="page"

<A href="/?example=1">1</A>
<A href="/?example=2">2</A>
<A href="/?example=3">3</A>

The problem is that all 3 links cannot be active here at the same time and aria-current fails to differentiate this difference. The workaround here would be to build a custom A that also takes into account the search params.

Your Example Website or App

https://stackblitz.com/edit/solidjs-templates-hhpgedwq?file=src%2FApp.tsx

Steps to Reproduce the Bug or Issue

  1. Create multiple links that update search params
  2. See all are considered active and all have an invalid aria-current

Expected behavior

Some way to force active to account for the search params

Screenshots or Videos

No response

Platform

  • OS: macOS
  • Browser: Chrome
  • Version: 132

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions