canonical / canonical/vanilla-framework

Tooltip description read out twice by screen reader

Open
#4,240 2 comments 1 reaction 0 assignees View on GitHub
Accessibility P3 Triaged Priority: Medium Triaged: Pragma
Dominant language
HTML
Stars
983
Forks
216
Avg merge
3d 13h
Merged PRs (30d)
3

Description

**Describe the bug**

First the button text is read out, then additional description (aria-describedby). The additional description is being read out twice because it's placed inside of the button and is part of the button text content.

**To Reproduce**

Steps to reproduce the behavior:

1. Go to https://vanillaframework.io/docs/patterns/tooltips
2. Activate VoiceOver
3. Allow VoiceOver to read through tooltips and see how the text is read out twice

**Expected behavior**

The description should only be read out twice.

**Additional context**

Some solutions were suggested by @petermakowski

1. Move span outside the button
```

Bottom left

Product name to be displayed on the storefront.
```

2. Try adding `aria-hidden="true"` to the tooltip span
```

Bottom left
Product name to be displayed on the storefront.

```

Contributor guide

Open the contributing guide

Research direction

Start at the tooltip examples on https://vanillaframework.io/docs/patterns/tooltips and inspect the button and tooltip span markup. Reproduce the issue with VoiceOver, evaluate the two suggested markup approaches, and confirm that the tooltip description is announced only once.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
accessibility, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.