Skip Menu |
 

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the CGI CPAN distribution.

Report information
The Basics
Id: 12289
Status: resolved
Priority: 0/
Queue: CGI

People
Owner: Nobody in particular
Requestors: kelson [...] speed.net
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



Subject: Tabindex starts at 0 instead of 1 if start_html is not used
Download (untitled) / with headers
text/plain 1.1k
Using CGI.pm 3.0.7 on Linux (Red Hat 9, kernel 2.4.29) with Perl 5.8.0 If CGI.pm methods are used to generate form fields, but not the entire HTML document -- specifically, if start_html is not used -- tabindex numbering starts at 0 instead of 1. Since a tabindex of 0 is equivalent to not having a tabindex property at all, this can result in an unexpected tab order. (With the tabindex=0 field selected, tabbing will jump to the next tab *without* a tabindex instead of jumping to tabindex=1.) Noticed on OpenWebmail, which uses CGI.pm to fill in fields in pre-defined templates. Test case: #!/usr/bin/perl use CGI qw(:standard); print "Content-type: text/html\n\n"; # Swap the next two lines and look at the tabindexes generated. #print start_html(-title=>'Tabindex Test'); print "<html><head><title>Tabindex Test</title></head><body>"; print startform(-action=>"doesntmatter.pl"); print p ('Login', textfield(-name=>'loginname', -size=>10) ); print p ('Password', password_field(-name=>'password', -size=>10) ); print submit(-value=>'Submit this' ); print end_form(); print qq~<p><a href="/">No tabindex</a> - <a href="/">here either</a></p>~; print end_html();
The fix for thisbug will appear in version 3.08.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.