Skip to content

Add support to follow hash-based routing #209

Description

@a11ya11y

Currently, URLs with a fragment (e.g. https://site.com/#main) are filtered out (see function url_filter_fragment in filters.py).

However, in SPAs where the hash fragment is used for client-side routing, ignoring the hash means that CWAC misses major portions of the website's views or "pages".

Example of the Issue

On the following site, the content changes entirely based on the hash, but the crawler currently skips these links:

Base URL: https://aria.stats.govt.nz/aria/

Target Resource: https://aria.stats.govt.nz/aria/#ClassificationView:uri=http://stats.govt.nz/cms/ClassificationVersion/CARS5587

Preferred behavior

CWAC should be able to distinguish between:

  • Actual fragment identifiers: Same-page links to id or name values should be ignored.

  • Hash-based routing: Links that load new content (e.g., #StandardView:uri=hvybhrsoA0CNa1Dq) should be followed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions