-
Notifications
You must be signed in to change notification settings - Fork 20
Description
The problem
There are instances where an Image Card is used without the need for it to link to something, ie Subtle Selectable, but leaving the link attribute off or adding a null value (# or javascript:void(0)) creates a situation where the title is focusable but doesn't do anything (or worse causes it to navigate to an unexpected page).
The solution
Allow the Image Card to be generated without an anchor tag wrapping the title if no link attribute is present.
Alternatives considered
Update the Subtle Selectable variant to function similar to the Selectable and clicking on the title selects the checkbox. However this may be a breaking change as in some cases, we do want to have both a link to an item as well as the ability to check the box.
Additional information
When removing the link attribute altogether, this causes underlying Pharos link to actually turn into a button due to the logic that is in place with that component when an href is not present. This then creates the tab stop for a button that doesn't do anything (leading to confusion or frustration).