Closed Bug 268091 Opened 20 years ago Closed 20 years ago

Submit button needs focus outline when input or textarea has focus

Categories

(Core :: DOM: UI Events & Focus Handling, defect)

x86
Windows 98
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 102057

People

(Reporter: fotemac, Unassigned)

References

()

Details

User-Agent:       Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8a5) Gecko/20041105
Build Identifier: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8a5) Gecko/20041105

If you keyboard navigate to a Submit button, it gets a focus outline which
indicates that pressing ENTER will submit the form.  If an input field or
textarea gets focus, either via keyboard navigation or a mouse click, then the
Submit button also has focus in the sense that pressing ENTER will submit the
form. Other browsers, such as IE, therefor put a focus outline on the Submit
button when an input field or textarea has focus, but Mozilla 1.8a5 (Build ID:
2004110505) does not.  I think it should, if adding that nicety would not cause
a serious performance hit.


Reproducible: Always
Steps to Reproduce:
1. Access http://www.macridesweb.com/oltest/ONFOCUS.html
2. Keyboard navigate (TAB and Shift-TAB) to the Submit button and see that it
acquires a focus outline.
3. Mouse click or keyboad navigate into any of the input fields.  The Submit
button will not have a focus ring, but should.

Actual Results:  
The Submit button does not have a focus ring, but should.


Expected Results:  
The Submit button should have a focus ring, and does with other browsers such as IE.
(In reply to Description)
> -snip- If an input field or textarea gets focus, either via keyboard
> navigation or a mouse click, then the Submit button also has focus in
> the sense that pressing ENTER will submit the form. - snip -

I mis-spoke in the Description, in that for a textarea the ENTER key is data 
(newline) and does not cause submission of the form.  I modified the test 
document at the indicated URL to make that more clear.  I also looked more 
carefully at how IE 6.0 is handling this.  It has two focus outlines for form 
buttons.  One encases the entire button, and the other encases the labeling 
text within the button.  When a Submit button is given direct focus via 
keyboard navigation (or via a javascript focus() instruction), both focus 
outlines are displayed. When the direct focus is in an input field with 
type="text" or in a textarea, only the outer focus outline is used for the 
Submit button associated with that form field.

My guess is that the IE strategy is too elaborate for devolopers who are not 
paid engineers in Seattle.  But it should be relatively easy to add a standard 
Mozilla focus outline to the associated Submit button when an input field has 
direct focus, but no focus outline for the Submit button when a textarea has 
the direct focus.  This will make it clear when the Submit button is "hot" for 
keyboard navigators (i.e., when pressing ENTER will cause submission of the 
form).

(In reply to comment #1)
> (In reply to Description)
> -snip-  two focus outlines for form buttons.  One encases the entire
> button, and the other encases the labeling text within the button. -snip-

I examined the document at the above URL with a Mozilla v1.7 milestone release,
and that DOES have BOTH an inner AND an outer focus outline when the Submit or
Reset buttons have direct focus (by doing a mouseover or tabbing to the buttons
in that test document).  So the presence of only one focus outline in Mozilla
1.8a5 (Build ID:2004110505) is a bug or regression.  Hopefully that will be
fixed together with adding the outer focus outline to the Submit button when the
direct focus is in an input field with type="text".
Component: Browser-General → Keyboard: Navigation
This is already filed.  Please find the original and mark this duplicate.
Whiteboard: DUPEME
(In reply to comment #3)
> This is already filed.  Please find the original and mark this duplicate.

I had searched for "focus outline" or "focus ring" in "Summary" or "A Comment"
and had not found an earlier filing about this bug before I filed this bug
report.  I just tried again without success.  Boris, if your recollection is
correct, please use your superior skills to find the earlier filing and mark
this a duplicate yourself.  Otherwise, please help get this bug report confirmed
and assigned, and the bug fixed.

*** This bug has been marked as a duplicate of 102057 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
Whiteboard: DUPEME
Component: Keyboard: Navigation → User events and focus handling
You need to log in before you can comment on or make changes to this bug.