Timeline for Wrap a link around a block in Twig
Current License: CC BY-SA 4.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Aug 28, 2019 at 22:45 | comment | added | Prestosaurus | Hi @mazzy, you are correct. That was just an example and I guess could have been added in. Add link text, then hide text with css. Add css to absolute position your link. When you take away css and js, the dom is what should be 508 compliant. Js for link clicks creates a lot of work and Html will not allow you to nest a tags. If you’re going to do a js click function then implement a context menu so users can still right click. | |
Jul 15, 2019 at 21:21 | comment | added | Mazzy | @leymannx Indeed, the accepted answer with no anchor text is terrible for SEO | |
Jun 28, 2019 at 6:40 | comment | added | leymannx | @Kevin – Imagine having a card consisting of an image, a title and a teaser text. Then only the descriptive title should be linkwrapped for SEO. But the whole card should be clickable for UX. Than the technique from this very answer is the way to go. | |
Jun 28, 2019 at 5:35 | comment | added | Prestosaurus |
If you use a js on click function you may also want to implement contextmenu .
|
|
Jun 27, 2019 at 23:13 | history | edited | Mazzy | CC BY-SA 4.0 |
added 374 characters in body
|
Jun 27, 2019 at 23:11 | comment | added | Mazzy | I believe unless he wants to add another container inside its the only way with his markup structure. | |
Jun 27, 2019 at 23:06 | comment | added | Kevin | Disagree about javascript. | |
Jun 27, 2019 at 23:05 | review | First posts | |||
Jun 28, 2019 at 1:41 | |||||
Jun 27, 2019 at 23:04 | history | answered | Mazzy | CC BY-SA 4.0 |