components icon indicating copy to clipboard operation
components copied to clipboard

bug(matTooltip): Add option to set aria-labelledby rather than aria-describedby

Open kseamon opened this issue 4 years ago • 7 comments
trafficstars

Reproduction

matTooltip is only able to apply aria-describedby to its host element. This is not optimal for host elements that have no aria-label or text contents.

Expected Behavior

What behavior were you expecting to see?

For a button with no textual label, eg a MatIconButton, a tooltip typically provides a label rather than a description. Having matTooltip apply aria-labeledby rather than would be better in these cases.

At the very least, it would be good to have an Input to configure matTooltip's labeledby vs describedby preference. Extra credit: change the default for obvious cases like MatIconButton.

Actual Behavior

What behavior did you actually see?

matTooltip applies aria-describedby, with no option to change this behavior.

Environment

  • Angular: 12
  • CDK/Material: 12
  • Browser(s): any
  • Operating System (e.g. Windows, macOS, Ubuntu): any

kseamon avatar Jul 30 '21 19:07 kseamon

Related to internal ticket # 195133734

kseamon avatar Jul 30 '21 19:07 kseamon

Hello world !

SalemlocalAAA avatar Jul 30 '21 19:07 SalemlocalAAA

Hello

SalemlocalAAA avatar Jul 30 '21 19:07 SalemlocalAAA

Uploading 20210731_015958.jpg…

SalemlocalAAA avatar Jul 30 '21 19:07 SalemlocalAAA

Just a heads up that we kicked off a community voting process for your feature request. There are 20 days until the voting process ends.

Find more details about Angular's feature request process in our documentation.

angular-robot[bot] avatar Mar 13 '22 15:03 angular-robot[bot]

Thank you for submitting your feature request! Looks like during the polling process it didn't collect a sufficient number of votes to move to the next stage.

We want to keep Angular rich and ergonomic and at the same time be mindful about its scope and learning journey. If you think your request could live outside Angular's scope, we'd encourage you to collaborate with the community on publishing it as an open source package.

You can find more details about the feature request process in our documentation.

angular-robot[bot] avatar Apr 01 '22 15:04 angular-robot[bot]

Hi, we just came across this issue. Is this something that could be looked at?

wawyed avatar Aug 08 '24 09:08 wawyed