Closed
Bug 312093
Opened 19 years ago
Closed 18 years ago
Caret-moved events are not always reported
Categories
(Firefox :: Disability Access, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: wwalker, Assigned: aaronlev)
References
()
Details
(Keywords: access)
Attachments
(2 files, 10 obsolete files)
13.60 KB,
text/x-python
|
Details | |
93.12 KB,
patch
|
ginnchen+exoracle
:
review+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/412.7 (KHTML, like Gecko) Safari/412.5 Build Identifier: Firefox 1.5 Beta 2 When caret browsing mode is enabled via F7, caret-moved events are not always reported when the caret is moved. Reproducible: Always Steps to Reproduce: 1. Go to www.google.com 2. Enable caret browsing mode (F7) 3. Run the at-spi event-listener-test application 4. Navigate around the web page using the arrow keys Actual Results: Caret-moved events are not always reports. Expected Results: Caret-moved events should be reported each time the caret changes position on the display.
Willie, do you have stable reproduce steps for this bug? e.g. Put caret before which char, and press 'right' for x times, press 'right' again, it doesn't report. Thanks.
Assignee | ||
Comment 2•19 years ago
|
||
I think we're broken in XUL textboxes, but this could be a separate bug.
Assignee | ||
Updated•19 years ago
|
Assignee | ||
Comment 3•19 years ago
|
||
Attachment #199941 -
Flags: superreview?(neil.parkwaycc.co.uk)
Attachment #199941 -
Flags: review?(ginn.chen)
Assignee | ||
Updated•19 years ago
|
Attachment #199941 -
Flags: review?(ginn.chen) → review?(parente)
Assignee | ||
Comment 4•19 years ago
|
||
Comment on attachment 199941 [details] [diff] [review] Fix for XUL I'm moving this patch over to a separate bug for caret events in XUL textboxes, where it belongs (bug 312941).
Attachment #199941 -
Flags: superreview?(neil.parkwaycc.co.uk)
Attachment #199941 -
Flags: review?(parente)
Assignee | ||
Updated•19 years ago
|
Attachment #199941 -
Attachment is obsolete: true
Reporter | ||
Comment 5•19 years ago
|
||
I'm not sure if this is actually what Aaron has described. Here's some reproducable steps: 1) Run the at-spi event-listener-test 2) Run firefox 3) Go to http://www.google.com/firefox?client=firefox-a&rls=org.mozilla:en-US:official 4) Enable caret browsing mode 5) Click on the "E" in "Enjoy using Firefox?" or whatever text happens to be to the right of the lighbulb icon below the search area 6) Press the left arrow key several times As you do #4, the caret will move across several blank areas, but no events will be issued.
Some dicussion between Will and me. Ginn> To my understand, there are 3 or more phenomena. 1) "Tab" key moves the caret without emitting caret moved event. (See bugzilla 304805) 2) Sometimes, arrow key moves the caret without emitting caret moved event. 3) Sometimes, no symmetry to keyboard actions. Will> I think we could go for several days and find a large number of phenomena. The main point is that the caret navigation mode of Firefox is currently fraught with enough problems so as to make it not very useful for blind access. I had a meeting with IBM regarding caret navigation, and they said the same thing regarding the difficulty: it's very hard to fix since it is in a very sensitive part of the code base. We talked a fair amount about alternatives, such as a Javascript plugin and/or having the screen reader do the work. I think we reached the conclusion that it's just not worth the effort to try to continue work on the core caret navigation for the purposes of blind access. But we also reached the conclusion that it probably should not be completely abandoned since it's still OK for sighted people with physical impairments. So...I guess I'm saying that, from the Orca perspective, I'm fine with postponing any work on this particular bug right now.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Reporter | ||
Comment 7•18 years ago
|
||
Reporter | ||
Comment 8•18 years ago
|
||
I think it is time to look at this problem again. The lack of any caret or focus events whenever the caret moves is a serious detriment to any hope of making Firefox 2 a viable option for accessible browing.
Reporter | ||
Updated•18 years ago
|
Blocks: fox2access
ref: accessible/src/base/nsCaretAccessible.cpp line 190-235 perhaps we should fix some return NS_OK; here.
Comment 10•18 years ago
|
||
Assignee: nobody → ginn.chen
Status: NEW → ASSIGNED
Attachment #220238 -
Flags: review?(aaronleventhal)
Comment 11•18 years ago
|
||
I'm confused with this part of code. Sometimes mCurrentDOMNode is an AnchorElement if I move caret from left to right; if caret comes from right, mCurrentDOMNode is not. As far as I tested, with this patch is better than before. Another change is, when selection changes, it fires text-selection-change event together with caret-moved. Willie Walker and Peter Korn confirmed it should fire caret-moved event for link. (actually it already does without the patch, the code doesn't work as the comments wished) Also, we still have no caret-moved event or wrong offset data with some cases. (they're not regressions) 1) Caret position doesn't belong to TextFrame 2) Caret is over TextArea, but not inside. (a very old problem of caret browsing) 3) When caret is shifting out of a link by pressing ctrl+right, offset may counts wrong.
Assignee | ||
Updated•18 years ago
|
Attachment #220238 -
Flags: superreview?(bzbarsky)
Attachment #220238 -
Flags: review?(aaronleventhal)
Attachment #220238 -
Flags: review+
Comment 12•18 years ago
|
||
Comment on attachment 220238 [details] [diff] [review] patch I can't usefully sr this; I have no idea what this code is doing nor why, nor time to sort it out. Please ask someone else for sr.
Attachment #220238 -
Flags: superreview?(bzbarsky)
Assignee | ||
Updated•18 years ago
|
Attachment #220238 -
Flags: superreview?(jst)
Assignee | ||
Updated•18 years ago
|
Attachment #220238 -
Flags: superreview?(jst) → superreview?(roc)
I don't know this code either. Why is it so hard to get all caret events? We should be able to hook you into the nsCaret for each presshell so that you get notified whenever the caret moves (basically, from nsCaret::SetCaretDOMSelection and nsCaret::NotifySelectionChanged).
Comment 14•18 years ago
|
||
The problem is not to be notified, but it need to get nsIAccessibleText and caretOffset. I'm not sure if we can get them from nsCaret.
Assignee | ||
Comment 15•18 years ago
|
||
(In reply to comment #14) > The problem is not to be notified, but it need to get nsIAccessibleText and > caretOffset. > I'm not sure if we can get them from nsCaret. Ginn, I didn't understand this. Could you say it again in a different way?
From nsCaret, you can get the caret's associated content element, offset within the element, and also the hint --- everything that we use to determine the caret position. I'm not sure what else you could need.
Attachment #220238 -
Flags: superreview?(roc)
Comment 17•18 years ago
|
||
It needs more tests. I didn't test it with seamonkey/composer yet. And it causes a warning in GetCaretOffset if selection is not collapsed. We're already using NotifySelectionChanged, so every caret movement will get into this section. With MSAA, it only need to fire EVENT_LOCATION_CHANGE with "this". But for ATK, we need to find out which nsAccessibleHyperText the caret is in. nsAccessibleHyperText contains many text node and links, so we can't get it from nsCaret simply, the offset is also different. Actually, nsCarent->GetCaretContent() equals to domSel->GetFocusNode
Comment 18•18 years ago
|
||
> 3) When caret is shifting out of a link by pressing ctrl+right, offset may
> counts wrong.
This happens because gLastFocusedNode is still the link.
We can add another judgement in nsAccessibleHyperText::GetCaretOffset.
Another issue is BR frame, "\n" is not in mTextChildren of nsAccessibleHyperText.
So GetCaretOffset will fail.
I'll file another bug for these issues.
Comment 20•18 years ago
|
||
*** Bug 340782 has been marked as a duplicate of this bug. ***
Assignee | ||
Comment 21•18 years ago
|
||
Comment on attachment 220238 [details] [diff] [review] patch GetParentBlockNode() is now goig away via bug 340289 but you should be able to get the nsIAccessibleText via something like nsIDocument::GetAccessibleInParentChain(focusNode). Most of the time you should be able to just get an accessible for the focusNode and get the parent for that, but it won't work if there is no accessible to create for the focusNode.
Attachment #220238 -
Flags: review+ → review-
Assignee | ||
Updated•18 years ago
|
Assignee: ginn.chen → aaronleventhal
Status: ASSIGNED → NEW
Assignee | ||
Comment 23•18 years ago
|
||
Attachment #220238 -
Attachment is obsolete: true
Assignee | ||
Comment 24•18 years ago
|
||
One problem is that the caret events report a different position when moving right than left. For example, it appears that you move into the beginning of an inline child when you right arrow onto it. However, you cannot left arrow to the same beginning of that object. Instead you end up at the end of the previous one. I'd like to follow that problem up in a later bug.
Attachment #226579 -
Attachment is obsolete: true
Assignee | ||
Comment 25•18 years ago
|
||
Attachment #226669 -
Attachment is obsolete: true
Attachment #226823 -
Flags: review?(ginn.chen)
Assignee | ||
Comment 26•18 years ago
|
||
The only big thing nsHyperTextAccessible still needs is GetTextHelper() to work again (without moving selection). We'll also need to do more with contenteditable when it gets checked in. There is one odd case that doesn't always work. After InsertText() in a blank textfield, things are in a strange state, for example, the next InsertText() doesn't seem to work. I will probably file a separate bug for that.
Attachment #226823 -
Attachment is obsolete: true
Attachment #226898 -
Flags: review?(ginn.chen)
Attachment #226823 -
Flags: review?(ginn.chen)
Assignee | ||
Updated•18 years ago
|
Assignee | ||
Updated•18 years ago
|
Assignee | ||
Comment 27•18 years ago
|
||
Sorry Ginn, this is turning into another big patch which does a lot, but it's hard to separate it into individual pieces.
Attachment #226898 -
Attachment is obsolete: true
Attachment #227033 -
Flags: review?(ginn.chen)
Attachment #226898 -
Flags: review?(ginn.chen)
Assignee | ||
Comment 28•18 years ago
|
||
Attachment #227133 -
Flags: review?
Assignee | ||
Updated•18 years ago
|
Attachment #227033 -
Attachment is obsolete: true
Attachment #227033 -
Flags: review?(ginn.chen)
Assignee | ||
Comment 29•18 years ago
|
||
- This patch requires patch from bug 342596 in order to build (and to make GetText[Before|At|After]Offset work) - This patch requires patch from bug 340667 in order for <br> newline code to be useful
Attachment #227147 -
Flags: review?(ginn.chen)
Assignee | ||
Updated•18 years ago
|
Attachment #227133 -
Attachment is obsolete: true
Attachment #227133 -
Flags: review?
Assignee | ||
Comment 30•18 years ago
|
||
Attachment #227147 -
Attachment is obsolete: true
Attachment #227176 -
Flags: review?(ginn.chen)
Attachment #227147 -
Flags: review?(ginn.chen)
Assignee | ||
Comment 31•18 years ago
|
||
Attachment #227176 -
Attachment is obsolete: true
Attachment #228309 -
Flags: review?(ginn.chen)
Attachment #227176 -
Flags: review?(ginn.chen)
Comment 32•18 years ago
|
||
Looks good to me. I'll doublecheck it when I'm back. some minor issues, +NS_IMETHODIMP nsHTMLBRAccessible::GetName(nsAString& aName) should we call aName.Truncate()? - * Adds a selection bounded by the specified offsets. + i* Adds a selection bounded by the specified offsets. ...
Assignee | ||
Comment 33•18 years ago
|
||
> nsHTMLBRAccessible::GetName
I changed it so we set aName to the newline char, instead of appending the newline char. That way we don't need Truncate().
Attachment #228309 -
Flags: review?(ginn.chen) → review+
Assignee | ||
Updated•18 years ago
|
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Comment 34•5 years ago
|
||
Keywords: sec508
You need to log in
before you can comment on or make changes to this bug.
Description
•