Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: anchors with empty routerLink converted to buttons #1584

Merged
merged 25 commits into from
Feb 22, 2024

Conversation

DilaraGueler
Copy link
Contributor

@DilaraGueler DilaraGueler commented Feb 1, 2024

PR Type

[X] Bugfix
[] Feature
[ ] Code style update (formatting, local variables)
[X] Refactoring (no functional changes, no API changes)
[ ] Build-related changes
[ ] CI-related changes
[X] Documentation content changes
[ ] Application / infrastructure changes
[ ] Other:

What Is the Current Behavior?

For accessibility reasons, at many links a [routerLink]="[]" attribute is defined to ensure they were clickable. However, after the Angular 16 update, this approach often results in an unintended page scroll, causing the page to jump to the top.

The assigned issue regarding the 'show all/show less' link in the facet filter is related to the used empty routerlink at the anchor tag.

Issue Number: Closes #1572

What Is the New Behavior?

If links don't navigate the user to a new page but trigger only an action the <button> html element is used instead of an anchor tag and the css styling has been adapted accordingly. Use css classes btn btn-link btn-link-action for text links and btn-tool btn-link for icon links. Buttons inherently provide better support for keyboard interactions and enhance overall accessibility.

Issue #1572: To fix this issue use a button html tag instead of an anchor tag and design it as a link. Remove its routerLink attribute.

Does this PR Introduce a Breaking Change?

[ ] Yes
[X] No

Other Information

AB#93480

@DilaraGueler DilaraGueler changed the title Feature/anchors to buttons Feat: anchors with empty routerLink converted to buttons Feb 2, 2024
@DilaraGueler DilaraGueler changed the title Feat: anchors with empty routerLink converted to buttons refactor: anchors with empty routerLink converted to buttons Feb 2, 2024
@DilaraGueler DilaraGueler requested a review from SGrueber February 6, 2024 14:20
@DilaraGueler DilaraGueler self-assigned this Feb 6, 2024
@DilaraGueler DilaraGueler added bug Something isn't working refactoring Refactoring of current code labels Feb 6, 2024
@SGrueber SGrueber marked this pull request as ready for review February 15, 2024 19:17
Copy link

Azure Demo Servers are available:

@SGrueber SGrueber added this to the 5.1 milestone Feb 16, 2024
@SGrueber SGrueber force-pushed the feature/anchors_to_buttons branch from 55eb2e3 to adcbeef Compare February 16, 2024 12:12
Copy link

Azure Demo Servers are available:

Copy link

Azure Demo Servers are available:

Copy link

Azure Demo Servers are available:

@SGrueber SGrueber force-pushed the feature/anchors_to_buttons branch from d04beab to 38afabe Compare February 21, 2024 11:25
@SGrueber SGrueber force-pushed the feature/anchors_to_buttons branch from 38afabe to f475590 Compare February 21, 2024 13:12
@SGrueber SGrueber merged commit 4353eaf into develop Feb 22, 2024
21 checks passed
@SGrueber SGrueber deleted the feature/anchors_to_buttons branch February 22, 2024 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working refactoring Refactoring of current code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Active Filter Facets are removed after clicking "Show all" in the filters section
3 participants