-
-
Notifications
You must be signed in to change notification settings - Fork 640
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LibreOffice Calc: report merged cell coordinates #9310
Comments
LibreOffice Table Cells don't implement IAccessibleTableCell, and therefore there's no way to get the row and column span. LibreOffice itself also does not expose the merged state in the accessible name of the cell. |
Bugs against Libre Office can be reported here: |
Related issue in LibreOffice #124832. |
Still reproducible in Libre Office 6.4 with NVDA 2019.3 RC2 |
I've just implemented support for IAccessibleTableCell in LibreOffice (commits: https://git.libreoffice.org/core/commit/839dbf9ecf9f8fbec7de983d1a2e16d7de6f868c, https://git.libreoffice.org/core/commit/97a88e30e2e084ab860635ff4e0a03442d8a12af ). Does LibreOffice now provide everything that's necessary so that the NVDA side can be implemented or is anything else needed from LibreOffice side? Daily build for LibreOffice (containing the changes) can be downloaded here (You'll need one that is from today or newer.): https://dev-builds.libreoffice.org/daily/master/current.html |
cc: @LeonarddeR Now, LibreOffice implement for IAccessibleTableCell. |
@michaelweghorn Thanks for this, awesome work. Could you tell when IAccessibleTable2 was implemented on the table? I think we'll need to come with a separate implementation in NVDA based on IAccessibleTable2/TableCell availability to make sure older versions won't break. |
I have the merged cells announcement working here locally, so that's a great thing. Having the ability to properly name a selected cell range (#6897) is a different thing though. LibreOffice doesn't fire a focus event for newly selected cells with shift+arrows, it seems. The cell the selection started from is also still regarded to as focused. Therefore, nvda doesn't announce selection. |
@LeonarddeR: I've added this just this week to the current LibreOffice development version, i.e. it will be available from LibreOffice 7.3 on only (whose release is to be expected around the beginning of February 2022). So I agree that having the implementation conditional on the interface being available sounds reasonable.
Nice!
Starting from your comment #6897 (comment) which also mentions that no focus event is fired, I have started looking into this a bit and trying to understand what is happening and what should potentially be happening. I need to admit that I currently do not understand what LibreOffice could/should do differently regarding the announcement of focus for that case, though. As you mention, the cell that the selection started from is still focused, which I think is the intended behavior. When you start typing, that goes to the initially selected cell, and it therefore looks correct to me that no focus is announced for other cells. From my (limited) understanding, this is also in line with MSAA documentation on selection and focus; quoting from there:
I think that one way that should generally work and with which I have experimented a bit locally is to override What do you think about this approach in general? Or do you have another suggestion what LibreOffice should be doing? (I'm still quite new to the a11y world and rather at the beginning of understanding how exactly things are supposed to work, and very happy on any hints/tips.) If you think it's useful, I'll be happy to share a test branch to at least demonstrate my idea. (I had planned to do that at some point anyway, but was still at a point where I was experimenting to get a somewhat better understanding myself before I would have started a discussion myself... I have also realized that there's a problem with |
That's exactly what I did now :)
That's interesting. So to clarify, behavior in LibreOffice differs from the behavior in Office Excel where focus changes when selecting? I.e. when on A1 and pressing shift+right arrow, B1 is focused in Excel, whereas A1 is still focused in Calc? |
Ah never mind, In excel the focus also stays on the cell where the selection has started from. However, Excel fires another focus event on the focused cell when the selection changes with the keyboard. I think that makes sense. Yet I will look at the several selection events for Libre. |
I think it'll work like this. Some findings:
It's really awesome to have you on board!
I'm not sure I understand you correctly. How does your idea differ from current alpha branch? |
Yes, exactly, that's what I am seeing and which sounded reasonable to me in general when reading the documentation mentioned above (but I'm not an expert).
One way this could potentially be handled is by remembering the selection and only announce it if it has changed, i.e. the new selection would only be announced for
Indeed, I also see this called only when moving focus from one cell to another one. I think for the other cases where selection changes from multiple cells to a single one,
From what I can see, this e.g. gets called when more than 10 cells are added to a selection (instead of the single selectionAdd events), e.g. when you have A1 to O1 selected, then press Shift+Down to extend the selection to be A1 to O2.
Do you mean the LibreOffice alpha branch? I'm not sure whether it was clear I was referring to a test branch for NVDA rather than LibreOffice. I have now pushed this branch to my fork of the repo as This is certainly not the way that an announcement should properly be done, but I think it shows a few ideas about a potential approach. When experimenting with this, I also realized that some things are not yet properly announced from LO side, e.g. the |
Thanks for all the clarifications.
That would be great.
Yes, I can reproduce it now.>
I was referring to LibreOffice Alpha, haha.
I loked at it and it was certainly promising. I chose a slightly different approach in LeonarddeR@b9f7ee1 that automatically ensures that duplicates are silenced.
True. Indeed, selectionRemove is missing. Some other things I observed:
|
I have looked into this and fixed it in LibreOffice:
Thanks a lot! That looks really great.
I can reproduce that and have looked a bit into it from LibreOffice side. I'll possibly work on a fix at some point. (I have some different potential approaches in mind. One which would be a rather quick fix by handling that specific case, another more fundamental change that would get rid of some double bookkeeping in the document model and on the Win a11y part of LibreOffice, but the latter might not be feasible or at least requires more work since other scenarios (unrelated to our Calc selection one) rely on the current way of how it is handled.) In case it helps here, I can offer to work on a rather quick fix for that specific case now; otherwise I'd probably keep that in mind as a potential task for "sometime later" (and then reconsider whether or not to do the bigger change).
Agreed. I still can't really come up with an idea myself that makes me really happy so far, though, but I may be missing something. Announcing focus on cells that are not really focused (which I understood Excel is doing) feels a bit odd to me. I was wondering a bit whether just sending a https://docs.microsoft.com/en-us/windows/win32/winauto/event-constants says this for
(From what I have read so far, using SelectionAdd and SelectionRemove still appears somewhat "cleaner" to me at least in theory, but from what I have seen so far, it doesn't really make things easier on either side.) |
Great, I'll test with that.
Thanks, will fix that.
It's not super important I think.
NO, Excel announces focus on the currently focused cell when the focused cell takes part in a changing selection. SO no focus events are fired on cells that aren't focused, at least that's what I understand from it. |
Thanks for the clarification.
Ah, that was a misunderstanding on my side then. |
I have thought over focus/selection a bit more and experimented a bit from a user perspective with both, Excel/NVDA on Windows and LibreOffice/Orca on Linux. Orca handles the two differently, as shown e.g. by this "opposite" example (where focus changes while selection remains unchanged):
In that scenario:
|
For clarification, those thoughts refer to the question of whether LibreOffice should send an extra focus event or not (not about whether or not NVDA should apply a separate handling for the case of selected cells vs. focus change in general). |
FYI, this point regarding Excel was discussed in #6959. I had a prototype branch to mimick Orca's behaviour, but people were rather asking to report both focus and selection and I haven't worked further on it. |
After seeing the "accSelection is broken in LibreOffice" comment in PR #12849, I have taken a look at this. The problem is that the Essentially, a call to
@LeonarddeR: Do you have any opinion here? Does that fix the brokenness you have observed or are there more problems? |
Sorry, that was a copy-paste mistake, should be: "Essentially, a call to |
Wow, this is great, thanks @michaelweghorn. I'd be glad to take michaelweghorn@5b03875 . I think it makes sense to fix this in LibreOffice as well, but this will at least work for other cases where no freshIEnumVARIANT is returned for AccSelection. |
@LeonarddeR: Great, thanks. I've just merged the LibreOffice change, so that will be fixed in LibreOffice 7.3 as well. |
….3 and above (#12849) Link to issue number: Fixes #9310 Fixes #6897 Summary of the issue: In LibreOffice calc, selection is not announced and for merged cells, only the first cell is announced. Description of how this pull request fixes the issue: In LibreOffice 7.3 development branch, support for IAccessibleTable2 and IAccessibleTableCell were added. This allows us to implement something that works as expected.
Steps to reproduce:
Actual behavior:
NVDA reports: a1
Expected behavior:
NVDA reports: a1 through a3
System configuration:
NVDA Installed/portable/running from source:
Installed.
NVDA version:
2018.4.1
Windows version:
6.1.7601 service pack 1
Name and version of other software in use when reproducing the issue:
LibreOffice 6.1.3.2
Other questions:
Does the issue still occur after restarting your PC?
Yes.
Have you tried any other versions of NVDA?
NO.
The text was updated successfully, but these errors were encountered: