Skip to content

Empty alt attribute is not consistently supported - No longer true #2273

@giacomo-petri

Description

@giacomo-petri

Accessibility support

There are several popular browsers that do not treat images with an empty alt attribute (alt="") as having a role of presentation but instead add the img element to the accessibility tree with a semantic role of either img or graphic.

ACT Rules

Test cases

Test case 1

An image with empty alt attribute value or no alt attribute value at all

<img src="some_src.png" alt="">
<img src="some_src.png" alt>

Testcase

External links

Test results

All browsers are ignoring/treating the image with empty alt as generic

Metadata

Metadata

Assignees

No one assigned

    Labels

    accessibility supportAccessibility support testing and tracking

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions