Created attachment 44219 [details] Accerciser screen-shot, a heading exposes ROLE_PARAGRAPH. A heading in writer document doesn't expose ROLE_HEADING to AT-SPI. It exposes ROLE_PARAGRAPH. If it exposes the correct role viz.ROLE_HEADING, assistive tools like a screen reader can use the information to improve accessibility of the document. Steps to reproduce: 1. Start Libre Office writer. Create a new text document. Add some text e.g. 'This is a heading'. Apply style 'Heading 1' to the text. Save the document. 2. Start Accerciser accessibility explorer. 3. Go to the accessible tree view at top left. As shown in attached screen-shot, select the accessible object corresponding to the heading just created. The Role column shows 'paragraph'. 4. In the plug-in view at top right, select Interface Viewer. The first line shows the role as 'paragraph'. The text box shows the heading text. 5. Go to the IPythonConsole at bottom. A command acc.getRole() returns ROLE_PARAGRAPH.
[This is an automated message.] This bug was filed before the changes to Bugzilla on 2011-10-16. Thus it started right out as NEW without ever being explicitly confirmed. The bug is changed to state NEEDINFO for this reason. To move this bug from NEEDINFO back to NEW please check if the bug still persists with the 3.5.0 beta1 or beta2 prereleases. Details on how to test the 3.5.0 beta1 can be found at: http://wiki.documentfoundation.org/QA/BugHunting_Session_3.5.0.-1 more detail on this bulk operation: http://nabble.documentfoundation.org/RFC-Operation-Spamzilla-tp3607474p3607474.html
Today I rechecked my observation with Libre Office dev 3.5.0 beta2 and found that the bug persists. I suggest that the bug be moved back to NEW status.
Dear bug submitter! Due to the fact, that there are a lot of NEEDINFO bugs with no answer within the last six months, we close all of these bugs. To keep this message short, more infos are available @ https://wiki.documentfoundation.org/QA/NeedinfoClosure#Statement Thanks for understanding and hopefully updating your bug, so that everything is prepared for developers to fix your problem. Yours! Florian
I don't know how I missed the bugmail, but this was never addressed.
Okay
Corresponding Apache OpenOffice bug: https://issues.apache.org/ooo/show_bug.cgi?id=117204
I am still researching into this, found some spot in the code that looks suspicious. If we are going to add this, we should consider adding in all the fixmes. I suspect it has to this with this line here: vcl/osx/a11yrolehelper.mm: MAP( AccessibleRole::HEADING, NSAccessibilityUnknownRole ); // FIXME See : https://github.com/LibreOffice/core/blob/c49721950cb3d897b35f08bf871239308680b18e/vcl/osx/a11yrolehelper.mm#L69 here are other occurrences of AccessibleRole::HEADING offapi/com/sun/star/text/AccessibleParagraphView.idl: ::com::sun::star::accessibility::AccessibleRole::HEADING. sw/source/core/access/accpara.cxx: return AccessibleRole::HEADING; vcl/unx/gtk/a11y/atkwrapper.cxx: roleMap[accessibility::AccessibleRole::HEADING] = registerRole("heading"); vcl/osx/a11yrolehelper.mm: MAP( AccessibleRole::HEADING, @"" ); mike
vcl/osx/a11yrolehelper.mm: this turns out to be just osx specific, so is not what I was looking for.
It seems to me that the cause of the bug is related to SwAccessibleParagraph::getAccessibleRole (at accpara.cxx). this method is called when the object is created, it can happen in one of these cases: 1. When you open a document 2. When you create a new document 3. When you press enter to add a paragraph Case 1 is working properly, if you open a document that contains some heading, it will get the HEADING role. In case 2, when the empty document is created an empty paragraph is created too, and it has the PARAGRAPH role. Even if you change its style to a heading later, getAccessibleRole is not called again and the role doesn't change. Case 3 is like 2, when you press enter a new, empty paragraph is created and it has the same problem.
Patch pushed for review: https://gerrit.libreoffice.org/7853
Jacobo Aragunde Perez committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=c1d69c0e9e3361f9dd340ac133407e1dbb1d08ca fdo#35105: notify role change through a new UNO a11y event The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Radu Ioan committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=396d4f1c911770895900301f453b6d8f46243252 Related: fdo#35105 initially map HEADING to ATK_ROLE_HEADING The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Notes for unit test writers: Revert has to be done manually. See https://wiki.documentfoundation.org/Development/Accessibility_Unit_Tests