Read CGI.pm a little closer :) Tabindex will only get added if $XHTML is true, but it won't necessarily get added -- even though from looking at just the line return $XHTML ? qq(<input type="$tag" name="$name" $tabindex$value$s$m$other />) this seems to be the case, if look you up a few lines, $tabindex gets set by calling the element_tab method, which returns an empty string unless -tabindex was passed at some point. So it looks like you can use the -no_xhtml switch to work around this, but there is still something strange going on.
If I had to guess, I'd say that tabindex was added to the HTML standard when XHTML came out, which is why it does this. XHTML should probably be the default since it is the most current standard, although if you decide to use HTML4 or whatever there is nothing inherently wrong with that.
Out of curiosity, what version of CGI.pm do you have? I'm looking at 3.15 here... it's possible we're looking at totally different things. Also, did you try the two one-liners I suggested -- and if you did, what were the results?
In reply to Re^5: CGI.pm and tabindex
by dirving
in thread CGI.pm and tabindex
by ruzam
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |