mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Dashboard: Add accessible landmark markup (#36753)
* Add landmark markup * Make panel titles h2 * Descibe panel landmarks * Add nav elements and heading 1 * Reset line height and remove margin * Make focus styles visible * Change nav to section * Add desc * Fix focus styles cutoff
This commit is contained in:
@@ -114,9 +114,10 @@ class DashNav extends PureComponent<Props> {
|
||||
}
|
||||
|
||||
if (canStar) {
|
||||
let desc = isStarred ? 'Unmark as favorite' : 'Mark as favorite';
|
||||
buttons.push(
|
||||
<DashNavButton
|
||||
tooltip="Mark as favorite"
|
||||
tooltip={desc}
|
||||
icon={isStarred ? 'favorite' : 'star'}
|
||||
iconType={isStarred ? 'mono' : 'default'}
|
||||
iconSize="lg"
|
||||
@@ -127,11 +128,12 @@ class DashNav extends PureComponent<Props> {
|
||||
}
|
||||
|
||||
if (canShare) {
|
||||
let desc = 'Share dashboard or panel';
|
||||
buttons.push(
|
||||
<ModalsController key="button-share">
|
||||
{({ showModal, hideModal }) => (
|
||||
<DashNavButton
|
||||
tooltip="Share dashboard or panel"
|
||||
tooltip={desc}
|
||||
icon="share-alt"
|
||||
iconSize="lg"
|
||||
onClick={() => {
|
||||
|
||||
Reference in New Issue
Block a user