Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GrafanaUI: Define tooltip or aria-label as required for IconButton (#…
…69699) * refactor: modify interfaces to make tooltip or aria-label required * refactor: change functionality around aria-label and tooltip * refactor: change and add information in storybook documentation * refactor: remove default from tooltip * refactor: IconButton to make tooltip or aria-label required * refactor: Fix tests * refactor: Fix tests * refactor: Fix tests * refactor: Fix tests * feat: add migration guide for breaking change * feat: add latest requirements to storybook docs * refactor: separate iconbutton story with and without tooltip * refactor: remove exported baseArgs * refactor: clean up and restructure original story * refactor: adjust styling * refactor: enable control for tooltip * refactor: clean up * refactor: enable control for aria-label * refactor: fix theme getting the wrong theme * refactor: fix tests * refactor: adjust story * refactor: remove confusing story * refactor: adjust controls for stories
- Loading branch information
Showing
22 changed files
with
187 additions
and
119 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
docs/sources/developers/plugins/migration-guide/v10.0.x-v10.1.x/_index.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
description: Guide for migrating plugins from Grafana v10.0.x to v10.1.x | ||
keywords: | ||
- grafana | ||
- plugins | ||
- migration | ||
- plugin | ||
- documentation | ||
title: Migrate plugins from Grafana 10.0.x to 10.1.x | ||
menutitle: v10.0.x to v10.1.x | ||
weight: 1900 | ||
--- | ||
|
||
# Migrate plugins from Grafana version 10.0.x to 10.1.x | ||
|
||
## Accessibility update for IconButton component in grafana-ui | ||
|
||
We updated the component's TypeScript interface due to an accessibility issue. This change was delivered to the core `grafana` repo with [PR 69699](https://github.com/grafana/grafana/pull/69699). | ||
|
||
In case you are using the IconButton component in your plugin you will get TypeScript errors related to the change. | ||
|
||
**Recommended actions:** | ||
|
||
- Review use cases of IconButton in your plugin. | ||
- Add a meaningful tooltip which the component will also use as an aria-label. | ||
- Another option is to set an aria-label. In this case a tooltip will not be shown. | ||
|
||
**Please note:** | ||
The IconButton used to have a property called `ariaLabel` which got deprecated with this change. You can now use the regular property `aria-label` instead. |
10 changes: 8 additions & 2 deletions
10
packages/grafana-ui/src/components/IconButton/IconButton.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.