I have a dynamic html page, and I have an element (div.id=myComponent) in this html, that has three input element inside.
The direction of the body element is rtl and div.id="myComponent" element is ltr like this:
<html>
<body style="direction: rtl;">
<input type="text" /> <!-- I can not set tabindex for this elements. beacuse these are generate the dynamically. -->
...
<!-- any elements -->
<div style="direction: ltr;" id="myComponent">
<span> <input tabindex="3" type="text" placeholder="y" /></span>
<span><input tabindex="2" type="text" placeholder="m" /></span>
<span><input tabindex="1" type="text" placeholder="d" /></span>
</div>
<input type="text" />
...
</body>
</html>
I need it, when the focus enters the div.id="myComponent", like below:
d => m => y
but is reverse.
I use the tabindex attribute, but it is not working correctly.
How do you fix this problem?
Thanks.
myComponenthas been used in many place. in that case, I should reorder the elements in the all of documents.