Skip to content

Tooltip/popover overwrites existing aria-describedby attribute #24640

@tmorehouse

Description

@tmorehouse

Tooltips and popovers do not preserve the trigger element's existing aria-describedby attribute value.

The aria-describedby attribute supports specifying multiple space separated element ID's.

When adding a tooltip or popover to an element that has an existing aria-describedby attribute, the attribute is removed. And when opened the attribute is set only to the auto generated tooltip/popover ID. When the tooltip (or popover) is closed, the original aria-describedby is not restored. (the attribute is completely removed)

The above codepen results in the following markup:
image

Noe that the original aria-describedby attribute is not present on the input element.

Expected behavior:
That the tooltip (or popover) ID is added to the existing aria-describedby attribute when opened, and when closed the tooltip/popover ID is removed from the aria-describedby attribute (leaving any original ids in the attribute). If there wasn't any aria-describedby attribute on the trigger element, then the attribute can be removed.

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions