forked from carbon-design-system/carbon-for-ibm-dotcom
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(card): use link instead of button for pictogram card (carbon-des…
…ign-system#11225) Closes carbon-design-system#10960 [Jira ticket](https://jsw.ibm.com/browse/ADCMS-4074) Alternate approach to fixing carbon-design-system#10960. Previously we had attempted a resolution that wrapped the whole card in `<a></a>`. That solution introduced regressions with accessibiltiy. It's also come to my attention that the approach is a well [known poor approach](https://css-tricks.com/block-links-are-a-pain-and-maybe-just-a-bad-idea/). This solution takes the same approach as the Default Card component, which is to wrap the footer icon in a `<a></a>` and then absolute position a pseudo element child to make the whole card clickable still. More on [the pseudo-element method](https://css-tricks.com/block-links-the-search-for-a-perfect-solution/#aa-method-3-the-good-ol-before-pseudo-element). **Changed** - Wrap the footer icon in a link for the card pictogram in the same way as the default card - Adjustment to Storybook for Card so that the body copy is used on page load **Removed** - Remove the `role="button"` wrapper for pictogram card
- Loading branch information
1 parent
76702e2
commit 1197e24
Showing
3 changed files
with
16 additions
and
32 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -637,4 +637,4 @@ | |
position: relative; | ||
} | ||
} | ||
|
||
|
This file contains 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
This file contains 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