Implemented in https://github.com/jakub-g/ariatemplates/commit/5b21a57fb149b672a192ee4825e6caa729c15d47
and later refactored in https://github.com/jakub-g/ariatemplates/commit/4c0e38edd04705afa2ed9da5879406efde383515