[component]: Link area #3830
Labels
📦 components
Related to the @swisspost/design-system-components package
needs: 🏓 dev roundtable
To be discussed at the roundtable of esteemed developers
Milestone
Description
Create a web component that delegates clicks on it's area to the first slotted link. This solves a tricky accessibility issue where the link cannot wrap a card and cannot be reliably extended to the cards size via overlay. Optionally, the
<post-linkarea>
takes a selector to target a specific link. The only thing the component does then, is trigger a click on the link (slotted.querySelector('a').click()
).Props
selector
: optional selector to target a link (on the page, not only slotted into the component, default behaviour if not specified is to click on the first slotted linkRequirements
<post-linkarea>
should use the pointer cursor to indicate a clickable area:has(:focus-visible)
can be used to style the focus on the outer elementComponent naming
Resources
openui/open-ui#1111
Tasks
💻 Tasks
The text was updated successfully, but these errors were encountered: