Accessibility: font info is not announced with the Orca ScreenReader on Linux
Categories
(Core :: Disability Access APIs, defect, P1)
Tracking
()
People
(Reporter: francescotissera1211, Assigned: Jamie)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: regression, Whiteboard: [ctw-23h2])
Attachments
(1 file)
48 bytes,
text/x-phabricator-request
|
diannaS
:
approval-mozilla-beta+
diannaS
:
approval-mozilla-esr115+
|
Details | Review |
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/114.0
Steps to reproduce:
- turn on the Orca ScreenReader on any Linux distribution.
- Open Firefox, go to any webpage and press Oca plus F to announce the font information, such as font tipe, font size, forground and background colors.
Please note that the Orca key is usually mapped to the Insert key on the keyboard, although it can be changed to the caps lock key if needed.
Actual results:
Orca announces nothing
Expected results:
Orca should announce font information.
If a webpage, for example, has the font aset as Arial, a size of 13 PT and the forground and background colors are black and white orca should announce something like: "Font arial, 13 PT, forground color wite, background color black".
Info such as alignment and justification should be reported as well.
Comment 1•1 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::CSS Parsing and Computation' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•1 year ago
|
||
It looks like I cannot change the component. But this should almost certainly be in Disability Access APIs. The bug is that Orca is not speaking font and formatting information. Orca gets that information via AtkText. I (Orca maintainer) haven't yet debugged where the failure is, but I can reproduce the problem and am not seeing it Chrome. I'll try to provide more details soon.
Comment 3•1 year ago
•
|
||
It appears that the bug is that the name of the exposed text attributes changed in Gecko. While I should be able to handle this in Orca, a quick code search suggests this is a regression rather than an intentional change. ConvertTextAttributeToAtkAttribute does the very thing Orca expects. For some reason it's no longer being called, which I assume is an accident?
Comment 4•1 year ago
|
||
Apparently Orca+F is not used very often in Gecko apps.
Good: 91.0a1 06-10-2021
Bad: 91.0a1 06-11-2021
I suspect:
commit 62d0cdcad450d6d61d60671e35f2d1d3933f4d01
Author: Eitan Isaacson <eitan@monotonous.org>
Date: Thu Jun 10 23:07:05 2021 +0000
Bug 1714390 - P2: Use AccAttributes for accessible and text attributes. r=Jamie
Differential Revision: https://phabricator.services.mozilla.com/D116783
static AtkAttributeSet* ConvertToAtkTextAttributeSet(
- nsIPersistentProperties* aAttributes) {
- if (!aAttributes) return nullptr;
-
+ AccAttributes* aAttributes) {
AtkAttributeSet* objAttributeSet = nullptr;
- nsCOMPtr<nsISimpleEnumerator> propEnum;
- nsresult rv = aAttributes->Enumerate(getter_AddRefs(propEnum));
- NS_ENSURE_SUCCESS(rv, nullptr);
-
- bool hasMore = false;
- while (NS_SUCCEEDED(propEnum->HasMoreElements(&hasMore)) && hasMore) {
- nsCOMPtr<nsISupports> sup;
- rv = propEnum->GetNext(getter_AddRefs(sup));
- NS_ENSURE_SUCCESS(rv, objAttributeSet);
- nsCOMPtr<nsIPropertyElement> propElem(do_QueryInterface(sup));
- NS_ENSURE_TRUE(propElem, objAttributeSet);
-
- nsAutoCString name;
- rv = propElem->GetKey(name);
- NS_ENSURE_SUCCESS(rv, objAttributeSet);
+ for (auto iter : *aAttributes) {
+ nsAutoString name;
+ iter.NameAsString(name);
nsAutoString value;
- rv = propElem->GetValue(value);
- NS_ENSURE_SUCCESS(rv, objAttributeSet);
+ iter.ValueAsString(value);
AtkAttribute* objAttr = (AtkAttribute*)g_malloc(sizeof(AtkAttribute));
- objAttr->name = g_strdup(name.get());
+ objAttr->name = g_strdup(NS_ConvertUTF16toUTF8(name).get());
objAttr->value = g_strdup(NS_ConvertUTF16toUTF8(value).get());
objAttributeSet = g_slist_prepend(objAttributeSet, objAttr);
-
- ConvertTextAttributeToAtkAttribute(name, value, &objAttributeSet);
}
Jamie: Assuming I'm correct, could the conversion to the Atk attribute name be restored? That way I don't have to have special handling in Orca just for Gecko. Thanks in advance!
Assignee | ||
Comment 5•1 year ago
|
||
Yeah, I don't think this was intentional. Sorry. :( Thanks for tracking it down.
Comment 6•1 year ago
|
||
Set release status flags based on info from the regressing bug 1714390
:eeejay, since you are the author of the regressor, bug 1714390, could you take a look?
For more information, please visit BugBot documentation.
Assignee | ||
Updated•1 year ago
|
Assignee | ||
Updated•1 year ago
|
Assignee | ||
Comment 7•1 year ago
|
||
Gecko uses different text attribute names to ATK.
Some of the values are also in a different format.
This detail was missed in the conversion from nsPersistentProperties to AccAttributes (bug 1714390), thus regressing text attributes for ATK.
Ther old conversion code added additional attributes, mangled strings, etc.
AccAttributes allows us to do better than this, so refactor the code accordingly.
Assignee | ||
Comment 8•1 year ago
|
||
What should I expect to hear about colours when I press Orca+f? I don't hear anything about colours, but I can't see anything wrong with my code.
Here's a try build. Joanie, are you able to tell me if I'm doing something wrong?
Comment 9•1 year ago
|
||
For the old builds I get a lot of "Gah. Your tab just crashed." BUT I can get the font info from the message. And it includes "foreground color: back", "background color: white". But, sure, let me try your try build.... Stay tuned.
Comment 10•1 year ago
|
||
Jamie: Seems to fix the bug.
Test: data:text/html,<div>foo</div>
Orca+F: size: 12, family name: Noto Serif, foreground color: black, background color: white'
Thanks!
Assignee | ||
Comment 11•1 year ago
|
||
Weird. I couldn't get it to announce the colour no matter what I did. I wonder if I have some setting disabled... or something. Anyway, glad it fixes it for you.
Reporter | ||
Comment 12•1 year ago
|
||
I can confirm getting font information, colors and all, works. even the text being bold was announced.
Assignee | ||
Updated•1 year ago
|
Comment 13•1 year ago
|
||
Updated•1 year ago
|
Comment 14•1 year ago
|
||
bugherder |
Comment 15•1 year ago
|
||
The patch landed in nightly and beta is affected.
:Jamie, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- If no, please set
status-firefox116
towontfix
.
For more information, please visit BugBot documentation.
Assignee | ||
Comment 16•1 year ago
|
||
Francesco, would you be willing to verify that this works as expected in Firefox Nightly? If it does, I'll try to get this uplifted to beta and ESR. Thanks.
Reporter | ||
Comment 17•1 year ago
|
||
I can confirm that reporting of all font info works on the latest nightly build downloaded from https://www.mozilla.org/en-US/firefox/channel/desktop.
Assignee | ||
Comment 18•1 year ago
|
||
Comment on attachment 9343052 [details]
Bug 1837163: Use correct ATK text attribute names.
Beta/Release Uplift Approval Request
- User impact if declined: Linux Orca screen reader users will not be able to access any font information.
- Is this code covered by automated tests?: No
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: No
- If yes, steps to reproduce:
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Only impacts exposure of formatting attributes for Linux accessibility, which was completely broken before this patch anyway.
- String changes made/needed:
- Is Android affected?: No
Comment 19•1 year ago
|
||
Comment on attachment 9343052 [details]
Bug 1837163: Use correct ATK text attribute names.
Approved for 116.0b6
Comment 20•1 year ago
|
||
uplift |
Updated•1 year ago
|
Comment 21•1 year ago
|
||
Please nominate for ESR115 also when you get a chance :)
Updated•1 year ago
|
Updated•1 year ago
|
Assignee | ||
Comment 22•1 year ago
|
||
Comment on attachment 9343052 [details]
Bug 1837163: Use correct ATK text attribute names.
ESR Uplift Approval Request
- If this is not a sec:{high,crit} bug, please state case for ESR consideration: Some broken screen reader functionality on Linux.
- User impact if declined: Linux Orca screen reader users will not be able to access any font information.
- Fix Landed on Version: 116, 117
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Only impacts exposure of formatting attributes for Linux accessibility, which was completely broken before this patch anyway.
Comment 23•1 year ago
|
||
Verified fixed on Ubuntu 20.04 using Nightly 117.0a1 (20230718215135) and Beta 116.0b7 (20230718185323).
Comment 24•1 year ago
|
||
Comment on attachment 9343052 [details]
Bug 1837163: Use correct ATK text attribute names.
Approved for 115.1esr
Comment 25•1 year ago
|
||
uplift |
Updated•1 year ago
|
Comment 26•1 year ago
|
||
Verified fixed on 115.1.0esr (20230719225449) build from treeherder.
Reporter | ||
Comment 27•1 year ago
|
||
Confirmed to work in FF 116 from Arch testing
Description
•