Skip to content

Cannot be made accessible because id prop isn't propagated to wrapper #341

@WickyNilliams

Description

@WickyNilliams

To make the tooltip accessible, you need an aria-describedby attr on the element that triggers the tooltip (whose value is the id of the tooltip wrapper). Since id isn't added to the tooltip wrapper element, this component cannot be made accessible. e.g this is the minimum required html, which is not possible to achieve:

<div aria-describedby="foo">
  I'm a trigger
</div>
<div role="tooltip" id="foo">
  I'm a tooltip
</div>

I would also ask, why is this not accessible by default?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions