Closed
Bug 132489
Opened 23 years ago
Closed 22 years ago
caret should stop blinking when user enters menus
Categories
(SeaMonkey :: General, defect, P3)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla1.0
People
(Reporter: aaronlev, Assigned: aaronlev)
References
(Blocks 1 open bug)
Details
(Keywords: access, Whiteboard: [adt3] poor man's screen reader access, even if vendors sit still)
Attachments
(1 file, 5 obsolete files)
1.34 KB,
patch
|
yuanyi21
:
review+
bryner
:
superreview+
|
Details | Diff | Splinter Review |
1. Hit Accel+Shift+K to toggle caret browsing on.
2. Notice the caret is blinking in the browser content.
3. Hit Alt+F to enter file menu. Notice caret is still blinking
What should happen - caret should stop blinking temporarily when entering
menus, and start blinking again when menus are exited
Assignee | ||
Updated•23 years ago
|
Comment 1•23 years ago
|
||
nsbeta1+, blocking a real world user from effectively using ns with a screen
reader.
Hi, aaronl
I'm a member of browser-china-atf. I plan to work on the bug.
But I can't see the caret blinking in browser content. Do you refer to the
caret blinking in url input line at location bar? thanks!
Do you mean the caret blinking in some textaread such as a input control of a
form?
Assignee | ||
Comment 4•23 years ago
|
||
We have a "browse with caret" mode that allows the user to select text with the
keyboard. You can toggle it off and on with Accel+Shift+K.
It gives you a blinking caret that you can move around in the document with, as
if in a read-only editor.
However, when you pull down a menu it should stop blinking.
I also noticed that if you're in the editor, or in a textfield or textarea, it
also doesn't stop blinking. Compare this with notepad or another application,
where the caret stops blinking as you enter the menus.
Assignee | ||
Comment 5•23 years ago
|
||
Resummarizing: this is a problem no matter where the caret is - the caret could
be in a form control, or in composer.
This is not a recent regression - this has been a problem for quite a while. Not
sure if we ever had this right.
Having a caret blinking while the user enters menus will mess up screen readers
entirely.
Blocks: focusnav
Summary: Browse with caret: caret should stop blinking when user enters menus → caret should stop blinking when user enters menus
Assignee | ||
Updated•23 years ago
|
Assignee | ||
Updated•23 years ago
|
Whiteboard: [adt3] poor man's screen reader access, even if vendors sit still
Comment 6•23 years ago
|
||
Changing nsbeta1+ [adt3] bugs to nsbeta1- on behalf of the adt. If you have any
questions about this, please email adt@netscape.com. You can search for
"changing adt3 bugs" to quickly find and delete these bug mails.
Keywords: nsbeta1-
Comment 7•23 years ago
|
||
Changing nsbeta1+ [adt3] bugs to nsbeta1- on behalf of the adt. If you have any
questions about this, please email adt@netscape.com. You can search for
"changing adt3 bugs" to quickly find and delete these bug mails.
Keywords: nsbeta1+
Assignee | ||
Comment 8•23 years ago
|
||
Wish I could go back and change old comments -
==== F7 is now the key (not Accel+Shift+K). ====
Assignee | ||
Comment 9•23 years ago
|
||
Comment 10•23 years ago
|
||
Comment on attachment 89376 [details] [diff] [review]
When menu bar gets toggled, so does caret if it was on
You should really initialize mWasCaretVisible to false in the constructor,
looks like there is a case where it could be checked before you're gotten its
value.
Assignee | ||
Comment 11•23 years ago
|
||
Attachment #89376 -
Attachment is obsolete: true
Comment 12•23 years ago
|
||
Comment on attachment 89453 [details] [diff] [review]
Initialize mCaretWasVisible(PR_FALSE) in constructor
>Index: nsMenuBarFrame.cpp
>===================================================================
>RCS file: /cvsroot/mozilla/layout/xul/base/src/nsMenuBarFrame.cpp,v
>retrieving revision 1.96
>diff -u -r1.96 nsMenuBarFrame.cpp
>--- nsMenuBarFrame.cpp 24 Apr 2002 07:15:33 -0000 1.96
>+++ nsMenuBarFrame.cpp 27 Jun 2002 21:23:09 -0000
>@@ -191,6 +195,37 @@
> mTarget->RemoveEventListener(NS_LITERAL_STRING("keyup"), (nsIDOMKeyListener*)mKeyboardNavigator, PR_TRUE);
>
> NS_IF_RELEASE(mKeyboardNavigator);
>+ }
>+
>+ // We don't want the caret to blink while the menus are active
>+ // The caret distracts screen readers and other assistive technologies from the menu selection
>+ // There is 1 caret per document, we need to find the focused document and toggle its caret
>+ nsCOMPtr<nsIDocument> document;
>+ nsCOMPtr<nsIFocusController> focusController;
>+ nsCOMPtr<nsIPresShell> presShell;
>+ mPresContext->GetShell(getter_AddRefs(presShell));
>+ if (presShell) {
>+ presShell->GetDocument(getter_AddRefs(document));
>+ if (document)
>+ document->GetFocusController(getter_AddRefs(focusController));
>+ }
>+ if (focusController) {
>+ nsCOMPtr<nsIDOMWindowInternal> windowInternal;
I'd just write this so that we return early if presShell, document, or
focusController are null, to avoid over-indenting. Your call though.
>+ focusController->GetFocusedWindow(getter_AddRefs(windowInternal));
>+ nsCOMPtr<nsIDOMWindow> window(do_QueryInterface(windowInternal));
>+ nsCOMPtr<nsIDOMDocument> domDoc;
>+ window->GetDocument(getter_AddRefs(domDoc));
It may be possible for the focused window to be null here, although that raises
the question of how the user opened the menu... Probably better to null-check
it though.
Assignee | ||
Comment 13•23 years ago
|
||
Sorry, I didn't want a review of this yet - Hewitt and I decided that nsCaret
needs to listen for menu bar activity.
Assignee | ||
Comment 14•23 years ago
|
||
Caret should know about the menu bar, so that it knows when to stop blinking.
Menus didn't fire the right events to notify the caret in all situations, for
example when Alt by itself is pressed to enter the menubar, or then escape to
leave the menubar. So this patch adds DOMMenuBarActive, DOMMenuBarInactive.
I also refactored nsMenuFrame::FireMenuDOMEvent() to FireDOMEvent() and moved
it up to nsBoxFrame, for code reuse purposes.
Attachment #89453 -
Attachment is obsolete: true
Comment 15•23 years ago
|
||
I really don't think the caret should know about app level widgets ... that is I
think the app or menu code should deal with hiding the caret.
Assignee | ||
Comment 16•23 years ago
|
||
Attachment #89529 -
Attachment is obsolete: true
Comment 17•23 years ago
|
||
Comment on attachment 89596 [details] [diff] [review]
Returning to original impl at the request of Simon Fraser. Added more null checks for bryner.
r=bryner
Attachment #89596 -
Flags: review+
Comment 18•23 years ago
|
||
Comment on attachment 89596 [details] [diff] [review]
Returning to original impl at the request of Simon Fraser. Added more null checks for bryner.
sr=hewitt
Attachment #89596 -
Flags: superreview+
Assignee | ||
Comment 19•22 years ago
|
||
forgot to mark fixed.
Status: ASSIGNED → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Comment 20•22 years ago
|
||
I still can reproduce this bug by these two ways:
1) turn on caret browsing;
2) pull down the "Window" menu, caret stop blinking;
3) click the "Tools" menu, now caret is blinking again.
-or-
1) turn on caret browsing;
2) pull down the "Tools" menu and open the "Form Manager" submenu, caret stop
blinking;
3) press <esc> to close the "Form Manager" submenu, caret is blinking again.
Version:
Mozilla 1.1b
Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1b) Gecko/20020905
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 21•22 years ago
|
||
We need this, it will mess up screen reader users -- at least on Windows.
Assignee | ||
Updated•22 years ago
|
Blocks: focusblink
Assignee | ||
Comment 22•22 years ago
|
||
The cases mentioned by Kyle are caused by PresShell.cpp
PresShellViewEventListener::DidRefreshRegion() {
return RestoreCaretVisibility();
}
That code and the caret code have no idea when the menu bar is active.
Assignee | ||
Comment 23•22 years ago
|
||
Attachment #89596 -
Attachment is obsolete: true
Assignee | ||
Updated•22 years ago
|
Attachment #108849 -
Flags: superreview?(bryner)
Attachment #108849 -
Flags: review?(kyle.yuan)
Attachment #108849 -
Flags: review?(kyle.yuan) → review+
Assignee | ||
Comment 24•22 years ago
|
||
Comment on attachment 108849 [details] [diff] [review]
Use nsISelectionController methods instead of nsICaret. This way the presshell can properly keep track of the caret.
Found a problem with the patch.
Load google and tab to a link. If you alt+tab away and back, the cursor starts
blinking in the text box.
Attachment #108849 -
Attachment is obsolete: true
Attachment #108849 -
Flags: superreview?(bryner)
Assignee | ||
Comment 25•22 years ago
|
||
Assignee | ||
Updated•22 years ago
|
Attachment #109545 -
Flags: superreview?(bryner)
Attachment #109545 -
Flags: review?(kyle.yuan)
Attachment #109545 -
Flags: review?(kyle.yuan) → review+
Comment 26•22 years ago
|
||
Comment on attachment 109545 [details] [diff] [review]
Correct patch -- the last patch occasionally made the caret blink when it shouldn't
I'd change the check for selCon to be an assertion rather than a null-check.
There's no reason the QI should ever fail. Other than that, sr=bryner.
Attachment #109545 -
Flags: superreview?(bryner) → superreview+
Assignee | ||
Comment 27•22 years ago
|
||
fixed
Status: REOPENED → RESOLVED
Closed: 22 years ago → 22 years ago
Resolution: --- → FIXED
Updated•20 years ago
|
Product: Browser → Seamonkey
Comment 28•6 years ago
|
||
Keywords: sec508
You need to log in
before you can comment on or make changes to this bug.
Description
•