adobe / adobe/spectrum-web-components
[Bug]: Tooltip is missing role="tooltip"
- Dominant language
- TypeScript
- Stars
- 1.5k
- Forks
- 262
- Avg merge
- 3d 10h
- Merged PRs (30d)
- 68
Description
### Note: will be addressed in Gen2 via: https://github.com/adobe/spectrum-web-components/pull/6387
### Impacted component(s)
Tooltip
### Library version
1.9.0
### Expected behavior
According to the Tooltip documentation, it should have `role="tooltip"` set on its content. I am expecting to see the role set and for it to appear as `tooltip` in the accessibility tree.
### Actual behavior
The Tooltip component is missing a `role` of {{{}tooltip{}}}. It is not present in the accessibility tree and I do not see it in the shadow-root markup. This affects how it is being presented to assistive technology.
The SWC [accessibility documentation for the Tooltip component](https://opensource.adobe.com/spectrum-web-components/components/tooltip/#accessibility) says:
{quote}The tooltip is automatically assigned appropriate ARIA attributes:
{quote}
{quote}- `role="tooltip"` is applied to the tooltip content
{quote}
But I am not seeing that this is currently true. Was this intentional or a regression?
### Screenshots
Example accessibility tree in Chrome from shows it as a group:
Inspector markup:
### What browsers are you seeing the problem in?
Chrome
### How can we reproduce this issue?
1. Go to any Tooltip currently on
1. Inspect the tooltip component markup and its representation in the accessibility tree.
### Sample code or abstract reproduction which illustrates the problem
*No response*
### Severity
None
### Logs taken while reproducing problem
*No response*
### Would you like to track this issue in Jira?
- Yes, please tell me the ticket number!
Contributor guide
Research direction
Start with the Tooltip component and its accessibility documentation, then review the referenced Gen2 pull request #6387 to understand the work already underway. Verify whether the tooltip content exposes role="tooltip" in the accessibility tree; done means the documented role is present and covered by the relevant component checks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- accessibility, frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 25/100