PO-2984 Adding href, removing redundant attributes and amending styles for links#2343
Draft
ChrisGarratt122 wants to merge 7 commits intomasterfrom
Draft
PO-2984 Adding href, removing redundant attributes and amending styles for links#2343ChrisGarratt122 wants to merge 7 commits intomasterfrom
ChrisGarratt122 wants to merge 7 commits intomasterfrom
Conversation
Contributor
Author
|
This changes rely on updates to
The PR for the ui library changes is available here: |
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.
Jira link
See PO-2984
Change description
The cause of links rendering with incorrect styling (black colour as opposed to blue, and an IBeam cursor on hover when it should be a pointer) is caused when links are used without the
href=""attribute. The presence ofhrefon links is in the best interest of accessibility, but is only functionally required when navigating away from a page.Ideally link elements would only be used when navigating away from a page and would always use
hrefto achieve this, however there are many existing links across the application that are either used not to navigate away from the page or achieve their functionality via a(click)event.In the interest of retaining existing functionality across the application but still prioritising accessibility and expected stying, this PR is a compromise that applies the following changes to links application wide:
href, usinghref=""where functionality is achieved via a click event.event.preventDefault()is called in underlying methods to prevent unintended page navigation.tabindex="0". This is redundant as links withhrefare focusable by default.(keydown.enter)/(keyup.enter)handlers, links withhreftrigger click on enter by default.Testing done
Several affected links tested manually, ensured at least one instance of each different 'type' of link tested manually (e.g. list link, cancel link, delete link)
Tests introduced to check for presence of expected attributes on links and absence of redundant attributes.
Tests introduced to ensure original underlying methods are still being called and that
event.preventDefault()is being called.Security Vulnerability Assessment
CVE Suppression: Are there any CVEs present in the codebase (either newly introduced or pre-existing) that are being intentionally suppressed or ignored by this commit?
Checklist