New issue
Advanced search Search tips

Issue 710537 link

Starred by 22 users

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 1
Type: Bug-Regression
Team-Accessibility



Sign in to add a comment

Empty alt attributes are being removed which causes filenames to be read by screen readers

Reported by himedlo...@gmail.com, Apr 11 2017

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.98 Safari/537.36

Steps to reproduce the problem:
1. Turn on VoiceOver in Chrome
2. Read the page
3. The second example will have the src attr read even though the alt attr is empty

What is the expected behavior?
The screen reader should skip the image instead of reading its src attr

What went wrong?
The alt attr was changed from an empty string to null. Empty alt attrs are an accessibility best practice for presentational images so the user doesn't have to endure having the filename read to them.

Did this work before? Yes This thread states that this was changed: https://bugs.chromium.org/p/chromium/issues/detail?id=708192

Does this work in other browsers? Yes

Chrome version: 57.0.2987.98  Channel: n/a
OS Version: OS X 10.12.3
Flash Version:
 
sample.html
4.3 KB View Download
Labels: Needs-Triage-M57
Components: UI>Accessibility
Labels: Hotlist-Accessibility

Comment 3 by tkent@chromium.org, Apr 13 2017

Components: -Blink>HTML

Comment 4 by phistuck@gmail.com, Apr 14 2017

When I use document.body.innerHTML, I do see the empty alt attributes, so this is not an HTML issue, indeed, but only an accessibility issue.
I am experiencing this issue as well.  
Status: Available (was: Unconfirmed)
I am also experiencing this issue - this is causing an adverse experience for screen reader users. Using alt="" instead of role="presentation" is the current best practice and is recommended in linters such as jsx-a11y, so use of alt="" is widespread.
This needs fixing so that screen reader users can get the information that they need about the image rather than image01837474&3£282&z.jpg or some other meaningless file name. 
Sorry should have read properly concur with Emily Use alt="" is standard practise for null alt text where the image is decorative.
This need a urgent fix.People are confused. User experience should be a priority for you.

Comment 11 by debo...@lireo.com, Apr 28 2017

This issue needs fixing. When alt="", the screen reader should skip the image, not read out the src attribute. 
Owner: aleventhal@chromium.org
Status: Assigned (was: Available)
Aaron is working on this now

Cc: ellyjo...@chromium.org dmazz...@chromium.org
 Issue 717580  has been merged into this issue.
Status: Fixed (was: Assigned)
Project Member

Comment 15 by bugdroid1@chromium.org, May 3 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/7ae4d36b7f3b88d7998cc86c2fc6a7245ccdba96

commit 7ae4d36b7f3b88d7998cc86c2fc6a7245ccdba96
Author: aleventhal <aleventhal@chromium.org>
Date: Wed May 03 18:46:45 2017

Handle <img alt> and <img alt=""> as purposefully empty alt.

BUG= 701747 , 708192 , 710537 

Review-Url: https://codereview.chromium.org/2833843005
Cr-Commit-Position: refs/heads/master@{#469050}

[modify] https://crrev.com/7ae4d36b7f3b88d7998cc86c2fc6a7245ccdba96/chrome/common/extensions/api/automation.idl
[modify] https://crrev.com/7ae4d36b7f3b88d7998cc86c2fc6a7245ccdba96/content/browser/accessibility/accessibility_tree_formatter_auralinux.cc
[modify] https://crrev.com/7ae4d36b7f3b88d7998cc86c2fc6a7245ccdba96/content/browser/accessibility/accessibility_tree_formatter_win.cc
[modify] https://crrev.com/7ae4d36b7f3b88d7998cc86c2fc6a7245ccdba96/content/browser/accessibility/browser_accessibility.cc
[modify] https://crrev.com/7ae4d36b7f3b88d7998cc86c2fc6a7245ccdba96/content/browser/accessibility/browser_accessibility.h
[modify] https://crrev.com/7ae4d36b7f3b88d7998cc86c2fc6a7245ccdba96/content/browser/accessibility/browser_accessibility_android.cc
[modify] https://crrev.com/7ae4d36b7f3b88d7998cc86c2fc6a7245ccdba96/content/browser/accessibility/browser_accessibility_auralinux.cc
[modify] https://crrev.com/7ae4d36b7f3b88d7998cc86c2fc6a7245ccdba96/content/browser/accessibility/browser_accessibility_cocoa.mm
[modify] https://crrev.com/7ae4d36b7f3b88d7998cc86c2fc6a7245ccdba96/content/browser/accessibility/browser_accessibility_win.cc
[modify] https://crrev.com/7ae4d36b7f3b88d7998cc86c2fc6a7245ccdba96/content/browser/accessibility/dump_accessibility_tree_browsertest.cc
[modify] https://crrev.com/7ae4d36b7f3b88d7998cc86c2fc6a7245ccdba96/content/renderer/accessibility/blink_ax_enum_conversion.cc
[modify] https://crrev.com/7ae4d36b7f3b88d7998cc86c2fc6a7245ccdba96/content/renderer/accessibility/blink_ax_tree_source.cc
[modify] https://crrev.com/7ae4d36b7f3b88d7998cc86c2fc6a7245ccdba96/content/shell/test_runner/web_ax_object_proxy.cc
[add] https://crrev.com/7ae4d36b7f3b88d7998cc86c2fc6a7245ccdba96/content/test/data/accessibility/html/img-empty-alt-expected-android.txt
[modify] https://crrev.com/7ae4d36b7f3b88d7998cc86c2fc6a7245ccdba96/content/test/data/accessibility/html/img-empty-alt-expected-blink.txt
[modify] https://crrev.com/7ae4d36b7f3b88d7998cc86c2fc6a7245ccdba96/content/test/data/accessibility/html/img-empty-alt-expected-mac.txt
[add] https://crrev.com/7ae4d36b7f3b88d7998cc86c2fc6a7245ccdba96/content/test/data/accessibility/html/img-empty-alt-expected-win.txt
[modify] https://crrev.com/7ae4d36b7f3b88d7998cc86c2fc6a7245ccdba96/content/test/data/accessibility/html/img-empty-alt.html
[modify] https://crrev.com/7ae4d36b7f3b88d7998cc86c2fc6a7245ccdba96/content/test/data/accessibility/html/img-expected-android.txt
[add] https://crrev.com/7ae4d36b7f3b88d7998cc86c2fc6a7245ccdba96/content/test/data/accessibility/html/img-expected-blink.txt
[modify] https://crrev.com/7ae4d36b7f3b88d7998cc86c2fc6a7245ccdba96/content/test/data/accessibility/html/img-expected-mac.txt
[modify] https://crrev.com/7ae4d36b7f3b88d7998cc86c2fc6a7245ccdba96/content/test/data/accessibility/html/img-expected-win.txt
[add] https://crrev.com/7ae4d36b7f3b88d7998cc86c2fc6a7245ccdba96/content/test/data/accessibility/html/img-link-empty-alt-expected-android.txt
[add] https://crrev.com/7ae4d36b7f3b88d7998cc86c2fc6a7245ccdba96/content/test/data/accessibility/html/img-link-empty-alt-expected-blink.txt
[add] https://crrev.com/7ae4d36b7f3b88d7998cc86c2fc6a7245ccdba96/content/test/data/accessibility/html/img-link-empty-alt-expected-mac.txt
[add] https://crrev.com/7ae4d36b7f3b88d7998cc86c2fc6a7245ccdba96/content/test/data/accessibility/html/img-link-empty-alt-expected-win.txt
[add] https://crrev.com/7ae4d36b7f3b88d7998cc86c2fc6a7245ccdba96/content/test/data/accessibility/html/img-link-empty-alt.html
[add] https://crrev.com/7ae4d36b7f3b88d7998cc86c2fc6a7245ccdba96/content/test/data/accessibility/html/picture-expected-android.txt
[add] https://crrev.com/7ae4d36b7f3b88d7998cc86c2fc6a7245ccdba96/content/test/data/accessibility/html/picture-expected-mac.txt
[add] https://crrev.com/7ae4d36b7f3b88d7998cc86c2fc6a7245ccdba96/content/test/data/accessibility/html/picture-expected-win.txt
[add] https://crrev.com/7ae4d36b7f3b88d7998cc86c2fc6a7245ccdba96/content/test/data/accessibility/html/picture.html
[modify] https://crrev.com/7ae4d36b7f3b88d7998cc86c2fc6a7245ccdba96/third_party/WebKit/Source/modules/accessibility/AXNodeObject.cpp
[modify] https://crrev.com/7ae4d36b7f3b88d7998cc86c2fc6a7245ccdba96/third_party/WebKit/Source/modules/accessibility/AXObject.h
[modify] https://crrev.com/7ae4d36b7f3b88d7998cc86c2fc6a7245ccdba96/third_party/WebKit/Source/modules/accessibility/InspectorTypeBuilderHelper.cpp
[modify] https://crrev.com/7ae4d36b7f3b88d7998cc86c2fc6a7245ccdba96/third_party/WebKit/Source/web/AssertMatchingEnums.cpp
[modify] https://crrev.com/7ae4d36b7f3b88d7998cc86c2fc6a7245ccdba96/third_party/WebKit/public/web/WebAXEnums.h
[modify] https://crrev.com/7ae4d36b7f3b88d7998cc86c2fc6a7245ccdba96/ui/accessibility/ax_enums.idl
[modify] https://crrev.com/7ae4d36b7f3b88d7998cc86c2fc6a7245ccdba96/ui/accessibility/platform/ax_platform_node_win.cc

Cc: dtseng@chromium.org
Status: Available (was: Fixed)
Reopening as this bug refers to OS X/macOS and this bug is not fixed on that platform.

Images with *empty* alt text should be ignored/excluded from the accessibility tree on macOS, not just exposed without a label or description. 

This is what Safari does, and what Blink did until https://codereview.chromium.org/2479593007

https://w3c.github.io/html-aam/#img-element specifies that an img with an *empty* alt attribute should have a computed role of "presentation".

+dtseng@ to clarify what case the change I linked to was intended to support.
Labels: -Pri-2 Pri-1
Status: Fixed (was: Available)
Committed fix to remove alt="" images from Mac AX tree.

Sign in to add a comment