FP-1408: (Frontera) Fix Clickable Area of Article List Link #429
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.
Overview
Make sure clickable area of article list link always opens new page.
Issues
Changes
Prevent clickable area from changing shape while link is actively being clicked i.e. during
:active
state.Screenshots
FP-1408.Prod.vs.Local.mov
Testing
On Frontera home page, under "User Guides" (near bottom of page):
Notes
Breakdown of Problem & Solution
Situation
There are four list items (html
<li>
) on theFrontera home page. Each list item is a document with a description and a link (html<a>
) (the title of the document). That link/title has a pseudo element (cssa::before
). That pseudo element is stretched to be the same size as the list item, so that when that list item is hovered or clicked, it triggers the link being hovered/clicked.What is Working? What is Broken?
✓ As list item is hovered, link is hovered.
⨂ As list item is clicked, link isnotclicked.
Problem
The pseudo element (which increases the size of the clickable link) changes shape when link is clicked. Thus, wherever was clicked, after it is clicked, is not longer a clickable area. So when mouse click is released, browser does not register click in the area.
Why Does this Happen?
Upon click, offending code changes the link's
position
torelative
(so it can move the link up or down). If link isrelative
, then the pseudo element stretches to fill the link (which is just the text area) instead of the whole link. Further detail requiresunderstanding CSSposition: absolute
and its relationship toposition: relative
.Solution
Disable the offending code for article list links (untilFP-1249 changes article list markup to support the disabled code).
Footnotes
🆕 The fix got added during pprd deploy to test
v3.15.0
. ↩This fix removes a (broken) feature, which is okay. The feature was that the link title would move down by one pixel on click. The whole list item (and item outline) should move down, not just the title. FP-1249 will make it all move appropriately. There is a comment for this in the changed code in this PR. ↩