dequelabs / dequelabs/axe-core

Accessible name: Consider empty attributes as empty name

Open
#3,511 0 comments 0 reactions 0 assignees View on GitHub
accessibility support false negative
Dominant language
JavaScript
Stars
7.5k
Forks
933
Avg merge
2d 13h
Merged PRs (30d)
29

Description

This was brought up in ACT: https://github.com/act-rules/act-rules.github.io/issues/1861

```html

```

The above example in Firefox gets `hello world` as its accessible name, but in Chrome the name is empty, and so axe-core should fail this example.

Since the question's going to come up, this is **different** from how aria-label works. If you put an empty aria-label, Chrome will go onto the next name calculation method. It does not do that for the empty alt attribute case. We'll need to look at other scenarios here too. I don't know how this works for `img` elements for example, or `input[type=button]` with an empty `value`.

Before we can work on this we'll need to research similar cases, figure out where else this kind of logic applies.

Contributor guide

Open the contributing guide

Research direction

Start by researching the accessible-name behavior for empty alt, aria-label, img, and input[type=button] attributes, then compare the Firefox and Chrome results described in the issue. Done means identifying which empty-attribute cases axe-core should treat as an empty name and documenting the applicable scope before implementation.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
accessibility
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.