Closed Bug 1508870 Opened 2 years ago Closed 2 years ago
NVDA doesn't guess label from URL for unlabelled image links
47 bytes, text/x-phabricator-request
|Details | Review|
STR (with NVDA): 1. Open this URL: data:text/html,<a href="https://mozilla.org"><img src="https://placeholder.com/20.png"></a> 2. Press down arrow to read the only line. Expected: NVDA should say "link graphic 20" Actual: NVDA just says "link" If you disable AccessibleHandler, this works as expected. This seems to go all the way back to Firefox 58!
Oops. That URL should be: data:text/html,<a href="https://mozilla.org"><img src="https://via.placeholder.com/20.png"></a> Same STR and results though.
Looking at the NVDA code, my guess is that we're not differentiating between null and the empty string for accName and are instead always returning the empty string even if Gecko actually returned null. We probably need to tweak CopyBSTR in AccessibleHandler.h so that it returns null if the source string is null.
When determining if an author provided an empty alt attribute versus no alt attribute at all, our image accessible name is either an empty string or a null string. Screen readers can then choose to guess the name from the source if the author did not explicitly provide an empty alt text and thus marked the image as decorative. The accessible handler for the Windows remote processes did not account for this distinction, always returning what appeared to be an empty string.
Assignee: nobody → mzehe
Status: NEW → ASSIGNED
Pushed by email@example.com: https://hg.mozilla.org/integration/autoland/rev/af8241e64ecb Make a distinction between an empty returned string versus a null pointer, r=Jamie
Flags: needinfo?(mzehe) → needinfo?(jteh)
You need to log in before you can comment on or make changes to this bug.