Re: Accessible labels in alerts claim to be ROLE_PASSWORD_TEXT
Hello again So I didn't really find the time that I wanted to put on this but, I will at least try to account for what I found out this far. Caolán McNamara skrev 2013-11-05 13:59: On Mon, 2013-11-04 at 17:07 +0100, Niklas Johansson wrote: An other issue around this message box was the VclBox surrounding the buttons, that gets the role FILLER but should probably have the role PANEL. Changing the sal_uInt16 VclBox::getDefaultAccessibleRole() const to return PANEL made NVDA read the dialog content when the dialog got displayed. After a closer look my suggestion above is wrong. ... In general where I'm hoping to get to is that LibreOffice reports the same sort of hierarchy and types for a .ui that gtk would if it was rendering it. I *think* gtk defaults to PANEL for containers but FILLER for GtkBox, which is where those defaults in layout.cxx come from. Yep that is what we want. And I do believe that you are correct about the default roles. Looking closer (see below) at a messagebox created in glade you don't see any PANEL so question is do gtk use a container to group it's labels and override the default roles or does it use something else? I did the same and looked in Accerciser at the complete accessibility tree: - frame - alert - filler - filler - icon - filler - label - label -filler - push button - push button Sorry for not being able to report anything more interesting at this time. I probably need to let this rest for a while and concentrate on translation for LibreOffice 4.2. /Niklas ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: Accessible labels in alerts claim to be ROLE_PASSWORD_TEXT
On Mon, 2013-11-04 at 17:07 +0100, Niklas Johansson wrote: Yes, I tried that while debugging the issue and it makes it better. It now reports as ROLE_TEXT but since the text in our message boxes are copyable that might be better than reporting it as ROLE_LABEL. An other issue around this message box was the VclBox surrounding the buttons, that gets the role FILLER but should probably have the role PANEL. Changing the sal_uInt16 VclBox::getDefaultAccessibleRole() const to return PANEL made NVDA read the dialog content when the dialog got displayed. There is no problem in changing it from FILLER to PANEL if that's the right thing to do. But what happens in a normal gtk message dialog ? If I cook up a super simple one in glade and use glade-previewer -f simplemessage.ui and use the python code in the original code I get 6. [filler] for the GtkButtonBox that contains the buttons. In general where I'm hoping to get to is that LibreOffice reports the same sort of hierarchy and types for a .ui that gtk would if it was rendering it. I *think* gtk defaults to PANEL for containers but FILLER for GtkBox, which is where those defaults in layout.cxx come from. C. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: Accessible labels in alerts claim to be ROLE_PASSWORD_TEXT
On Sat, 2013-11-02 at 14:18 +0100, Niklas Johansson wrote: I've been trying to get a grip on bug fdo#70588 Accessible labels in alerts claim to be ROLE_PASSWORD_TEXT instead of ROLE_LABEL. In short this bug makes text inside message dialogs unreadable to screen readers (on all platforms). I've followed the code around a bit and it seems to be an issue with different WinBits that has the same value, more exactly WB_WORDBREAK and WB_PASSWORD has the same value and indirectly set the AccessibleRole to PASSWORD_TEXT. In newer message dialogs here is were the WB_WORDBREAK gets added: http://opengrok.libreoffice.org/xref/core/vcl/source/window/layout.cxx#2046 Bah, so does http://cgit.freedesktop.org/libreoffice/core/commit/?id=6ad8972d4b698617404e53d63f178e34b2d5358a make it work. I presume it does. We don't need to use WB_WORDBREAK for multiline edits, that's implied and like you say the bit is reused under a different name for a different purpose there. C. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: Accessible labels in alerts claim to be ROLE_PASSWORD_TEXT
Yes, I tried that while debugging the issue and it makes it better. It now reports as ROLE_TEXT but since the text in our message boxes are copyable that might be better than reporting it as ROLE_LABEL. An other issue around this message box was the VclBox surrounding the buttons, that gets the role FILLER but should probably have the role PANEL. Changing the sal_uInt16 VclBox::getDefaultAccessibleRole() const to return PANEL made NVDA read the dialog content when the dialog got displayed. On the other hand I'm not sure how generic this layout.cxx actually is supposed to be. Sorry for ranting on about this issue. I'm mostly just trying to understand the code and hopefully fixing a bug or two on the way. Thanks, Niklas Johansson Caolán McNamara skrev 2013-11-04 15:42: On Sat, 2013-11-02 at 14:18 +0100, Niklas Johansson wrote: I've been trying to get a grip on bug fdo#70588 Accessible labels in alerts claim to be ROLE_PASSWORD_TEXT instead of ROLE_LABEL. In short this bug makes text inside message dialogs unreadable to screen readers (on all platforms). I've followed the code around a bit and it seems to be an issue with different WinBits that has the same value, more exactly WB_WORDBREAK and WB_PASSWORD has the same value and indirectly set the AccessibleRole to PASSWORD_TEXT. In newer message dialogs here is were the WB_WORDBREAK gets added: http://opengrok.libreoffice.org/xref/core/vcl/source/window/layout.cxx#2046 Bah, so does http://cgit.freedesktop.org/libreoffice/core/commit/?id=6ad8972d4b698617404e53d63f178e34b2d5358a make it work. I presume it does. We don't need to use WB_WORDBREAK for multiline edits, that's implied and like you say the bit is reused under a different name for a different purpose there. C. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice