Fix login UI issue#468
Merged
Merged
Conversation
- improve accessibility
jfr2102
commented
May 29, 2025
| <div class="alert alert-warning"> | ||
| <span>You are not signed in. Click here to </span> | ||
| <a class="alert-link" (click)="login()" (keydown.enter)="login()" tabindex="0">sign in</a> | ||
| <a class="alert-link" href="javascript:void(0)" (click)="login()" (keyup.enter)="login()">sign in</a> |
Contributor
Author
There was a problem hiding this comment.
adding the href and keyup.enter event improves accessablity and avoid eslint accessablity errors
There was a problem hiding this comment.
Pull Request Overview
This PR fixes the login UI issue by addressing account null-checks and enhancing accessibility for the login link.
- Simplifies the account check in the navbar for cleaner logic.
- Updates the home component to use a new account condition syntax and adds a keyup event for improved accessibility.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/main/webapp/app/layouts/navbar/navbar.component.html | Simplified account check by replacing the explicit null check. |
| src/main/webapp/app/home/home.component.html | Updated account condition syntax and added keyup event handling for login. |
| <div class="alert alert-warning"> | ||
| <span>You are not signed in. Click here to </span> | ||
| <a class="alert-link" (click)="login()" (keydown.enter)="login()" tabindex="0">sign in</a> | ||
| <a class="alert-link" href="javascript:void(0)" (click)="login()" (keyup.enter)="login()">sign in</a> |
There was a problem hiding this comment.
Consider using a button element for the login action instead of an anchor tag with 'javascript:void(0)' to provide better semantic meaning and accessibility for assistive technologies.
Suggested change
| <a class="alert-link" href="javascript:void(0)" (click)="login()" (keyup.enter)="login()">sign in</a> | |
| <button class="alert-link" (click)="login()" (keyup.enter)="login()">sign in</button> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
the login screen is currently broken due to null checks for an undefined account.
Changes
Testing
Screenshots
Before:

After:

