Skip to content

Change Fail test case 2 in ACT rule 46ca7f: Element marked as decorative is not exposed - label is exposed in accessibility tree #295

@philljenkins

Description

@philljenkins

In the ACT test case below the ARIA label does go into the accessibility tree in Chrome and FF, so the accessible name is not empty. Although the developer may be confused because alt="" was added in their source code, perhaps thinking or hoping it would mark the img as decorative, but it wasn't, due to the alt attribute being ignored/overridden by the aria attribute because of the accessible name calculation spec for browsers.

Failed Example 2 Open in a new tab
This img element is marked as decorative through its empty alt attribute but has a non-empty aria-labelledby attribute causing it to be included in the accessibility tree with its implicit role of img.

<img src="/test-assets/shared/w3c-logo.png" alt="" aria-labelledby="label" /> 
<span hidden id="label">W3C logo</span>

Perhaps the implementers should report a warning or recommendation notifying the developer of the contradiction.

ACT should clarify why the Failed 2 above is a valid fail test case for ACT ruleID 46ca7f: Element marked as decorative is not exposed - see label (accessible name) results in accessibility tree in browsers

Other references:

IBM Equl Access Accessibility Checker IBMa/equal-access#2013

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions