torchbox / tbxforms

A Torchbox-flavoured template pack for django-crispy-forms, adapted from crispy-forms-gds.
https://pypi.org/project/tbxforms/
BSD 2-Clause "Simplified" License
6 stars 5 forks source link

Make sure aria-described always starts with errors, then hint, then info. Fix #11 #17

Closed thibaudcolas closed 2 years ago

thibaudcolas commented 2 years ago

Fixes #11. The fix was more involved than I was expecting, as we set aria-describedby in a few different places. For the Python implementation, I chose to refactor aria_describedby to a list so we don’t have as many checks on "is it defined already" for string concatenation.

I didn’t do any manual testing for this, as the unit tests seemed excellent.