Closed Bug 1596007 Opened 2 years ago Closed 1 year ago

NVDA screen reader not getting focus and read image ALT text

Categories

(Core :: Disability Access APIs, defect, P1)

70 Branch
defect

Tracking

()

VERIFIED FIXED
mozilla75
Tracking Status
firefox75 --- verified

People

(Reporter: rajsha0130, Assigned: Jamie)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:70.0) Gecko/20100101 Firefox/70.0

Steps to reproduce:

when clicking on up and down arrow keys using NVDA, the focus in not moving on image and its skip it to another HTML element. this issue i am facing on only FireFox

<div class="container">
<img src="img/example1.jpg" data-small="img/example1-mobile.jpg"
data-large="img/example1.jpg" class="img-section" alt="example image alt tag"/>
<div>

Actual results:

NVDA should focus on image and read the ALT value using arrow keys in firefox

Expected results:

NVDA should focus on image and read the ALT value using arrow keys in firefox

Component: Untriaged → Disability Access

The priority flag is not set for this bug.
:asa, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(asa)
Component: Disability Access → Disability Access APIs
Flags: needinfo?(asa)
Product: Firefox → Core

The priority flag is not set for this bug.
:Jamie, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jteh)

Confirmed. Distilled test case (with live image URL):

data:text/html,<img src="https://via.placeholder.com/100x100.png" alt="example image alt tag">

Sometimes, this works, but refreshing with control+r will eventually cause it to fail. Refreshing NVDA's buffer with NVDA+f5 also picks up the image.

Marco filed bug 1584235 for this, but that particular instance seemed to go away. However, it looks like the underlying issue is still present.

Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(jteh)
Priority: -- → P1
See Also: → 1584235

Tried this with accessibility.handler.enabled set to false and was still able to reproduce, so this is not due to AccessibleHandler.

This occurs because the image has a width and height of 0 while it's loading, so NVDA treats it as invisible.

While the image is loading, I think it should have the busy state, and it should then fire a state change when it's loaded. How to actually achieve that is an open question.

I thought perhaps the image frame would be reconstructed when its size became available, but this doesn't seem to happen. Emilio, do you know if this is correct or am I missing something? If correct, what's the best way to watch for an image going from 0 size to non-0 size because it's loaded? nsIImageLoadingContent::AddNativeObserver perhaps? That seems pretty heavy-weight, though; i.e. we need to manage our own observer for each image.

Flags: needinfo?(emilio)

imgINotificationObserver::SIZE_AVAILABLE looks like it's probably what we care about?

Yeah, getting image sizes is not guaranteed to reframe. You probably want nsImageFrame::OnSizeAvailable or UpdateImage.

Flags: needinfo?(emilio)
Assignee: nobody → jteh
Status: NEW → ASSIGNED
Pushed by jteh@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/f0af83199ea4
Fire an a11y state change event when an image's size becomes available. r=eeejay,emilio
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla75

== Change summary for alert #25005 (as of Wed, 19 Feb 2020 11:54:14 GMT) ==

Improvements:

60% build times android-4-0-armv7-api16 opt taskcluster-c5d.4xlarge 1,615.94 -> 642.75
57% build times android-4-0-armv7-api16 opt taskcluster-c5d.4xlarge 1,619.52 -> 702.10

For up to date results, see: https://treeherder.mozilla.org/perf.html#/alerts?id=25005

Flags: qe-verify+

Reproduced the issue using Firefox 72.0a1 (20191112214946) on Windows 10x64 and test case from comment 3. When focusing the image NVDA says Blank.
The issue is verified fixed with Firefox 75.0b7(20200322132212) on Windows 10x64. When focusing the image NVDA says Graphic example image alt tag as expected.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
See Also: → 1647506
You need to log in before you can comment on or make changes to this bug.