Closed rothsandro closed 2 years ago
Thank you for the issue! Agreed, this is a very important feature the library is lacking and I am currently working on it for the next release.
Hey @rothsandro, thanks again for the issue. Support for aria attributes was added in v0.0.5 here. Work still needs to be done to better document the type def and restrict possible aria attributes based on the role
of the element, but this is a start!
@willmartian Thanks 👍
In the following example dataTest
works correct (generates data-test
) but the aria attribute is added as arialabel
instead of aria-label
:
h.button.dataTest("123").ariaLabel("Hello")`Click Me`;
Oops, that is my bad. Fixed this in v0.0.7 and added a unit test to cover myself in the future. You can find a link of your code snippet working properly here.
Thanks again for being an early tester of this project! :)
Great, looks good now 🎉 Thanks
Is your feature request related to a problem? Please describe. hdot should support ARIA attributes to improve accessibility of a site.
Describe the solution you'd like ARIA Attributes should be supported similar to
data
attributes using camelCase.Describe alternatives you've considered The only workaround right now is using
[aria-xyz]
which is not a very nice syntax (and no TS support):