markteekman / accessible-astro-components

A set of Accessible, easy to use, Front-end UI Components for Astro.

Home Page:https://accessible-astro.netlify.app/accessible-components/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Rename Modal component's prop `id` --> `triggerId`?

tinymachine opened this issue · comments

Thanks for sharing these components — they look fantastic! In the readme's Modal example, the relationship between the <button> (which triggers the Modal) and the Modal component markup was a bit counterintuitive to me.

In the example, it seems like the <button>'s id should be something like modal1-trigger (usually ids describe the element they are attached to). And to me it would make sense for the Modal component's id prop to be renamed triggerId to clarify what it's referring to, and to avoid having it look like an id attribute.

Thanks again for these components!

Thank you for the compliments @tinymachine and thanks for contributing this issue, I highly appreciate it! 🙂 I agree that triggerId better suits the situation for the Modal component. I am working on a couple of updates at the moment in preparation of the Astro hackathon, so I will include this one right away!

Fixed in 1.5.1

This is great -- thanks, @markteekman!

Thanks again for the quick update!