ProductiveRage / Bridge.React

Bindings for Bridge.NET for React - write React applications in C#!
MIT License
74 stars 14 forks source link

Added support for Aria-* attributes #55

Closed kendallb closed 5 years ago

kendallb commented 5 years ago

Added support for Aria-* attributes and fixed the bug related to string.replace only doing the first instance of an _ without the global option.

I did not see any unit tests for the fixAttr function, so I modified the example to test it and make sure it works (and found out the underscore replacement was broken).

ProductiveRage commented 5 years ago

The tests for fixAttr are in the file DataAttributeTests because the method existed to add support for "data-" attributes (though you have now extended it to "aria-").

Would you mind adding a test that illustrates the only-replaces-first-underscore issue and maybe a test or two for the "aria-*" attributes? Then the code can be removed from the Bridge.React.Examples project since it was only really added to test that it works and the unit tests should do a better job of that.

kendallb commented 5 years ago

Sure I can do that.

kendallb commented 5 years ago

Ok should be all up to date now.