Handle aria attributes correctly (fixes #1011)