Closed Nikomus closed 5 years ago
sorry, maybe I wasn't clear :) this wasn't just a recommendation. I've encountered this scenario on several occasions before (on Allegiant) and discussed it with accessibility experts (one of which was Heydon :P)
you are correct in that you should never have a link within a link. the html spec forbids one interactive element inside another.
no aria enhancements needed. the onclick merely provides a larger surface for touch and mouse users. it remains accessible because we have the hyperlink for keyboard users. context is provided by the heading element. I would go further and have the wrapping element for each story teaser be a <section>
or even <article>
(instead of div
)
you may also have to stopPropagation
from the nested anchor to avoid multiple change route requests.
@falconx Hey! Thank you for the advice - I'm happy to go with it. I think I'll also have to:
@Nikomus Do you want to finish this? Or shall we ask @HedgehogHolly ? I have a feeling you may have done it locally already?
Fixes #159
Description
@neontribe/contemplating-action