Skip to content

[BUG]: Accessibility checker no longer ignores hidden blocks (regression) #2109

@wkeese

Description

@wkeese

Project

accessibility-checker-engine

Browser

Chrome

Operating system

MacOS

Description

EAAC should ignore blocks that are display: none, visibility: hidden, and/or aria-hidden="true. It used to work that way, up to the Oct 1, 2024 deployment. But after that (starting with the Nov 6, 2024 ruleset), it scans those blocks.

This leads to spurious error messages such as:

Multiple elements with "region" landmarks within the same parent region are not distinguished from one another because they have the same "data table toolbar" label

Steps to reproduce

Unlike #2103 this happens in both Node and on Chrome. A minimal test case is:

<html lang="en">
<head>
    <title>Test that display:none blocks are ignored</title>
</head>
<body>
    <main>
        <section aria-label="my section">
            This section is visible.
        </section>
        <section aria-label="my section" style="display: none">
            This section has the same label but is display:none, so there shouldn't be an error.
        </section>
    </main>
</body>
</html>

The problem also happens though with visibility: hidden and aria-hidden="true".

Metadata

Metadata

Labels

BugSomething isn't workingT64engineIssues in the accessibility-checker-engine componentuser-reportedIssues identified outside of the core team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions