I have a bunch of textbox elements which the readonly attribute gets added to and removed from based on a bunch of different conditions.
Users have complained that pressing the Tab key gets them 'stuck' on a textbox that is readonly.
I want to now add tabindex='-1' whenever I set readonly='readonly', and then remove the tabindex attribute whenever I remove the readonly attribute.
Is there a global event that I can use to do this? I'm trying to avoid finding every instance where it occurs and doing it manually.