Tooltip: aria-describedby is not applied or linked to the target, so the tooltip is not read aloud by screen reader #5971
Labels
Type: Enhancement
Issue contains an enhancement related to a specific component. Additional functionality has been add
Describe the bug
The tooltip does not work properly with screen readers.
According to the accessibility documentation for Tooltip:
The target (i.e. the element that causes the tooltip to open on hover or focus) does not have any
aria-describedby
applied to it by default. And if I applyaria-describedby
to the target manually, theid
of the tooltip does not correspond to thearia-describedby
value as stated by the documentation.Reproducer
https://stackblitz.com/edit/nuxt-starter-urhx2c?file=app.vue
PrimeVue version
3.52.0
Vue version
3.x
Language
TypeScript
Build / Runtime
Nuxt
Browser(s)
No response
Steps to reproduce the behavior
Click on the input (or otherwise focus it). The tooltip appears. In your browser's devtools, locate the tooltip and the input element. Observe that the
id
of the tooltip does not correspond to thearia-describedby
value that I defined on the input.If you have VoiceOver or another screen reader, you can also try interacting with the target element and notice that the tooltip is not read aloud.
Expected behavior
The
id
of the tooltip should correspond to thearia-describedby
value that I defined on the input. I would also expect that if there is noaria-describedby
on the target, that this attribute would be added based on the generatedid
value of the tooltip.The text was updated successfully, but these errors were encountered: