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:
Tobias Skarhed
2021-07-16 21:48:47 +02:00
committed by GitHub
parent 2172920095
commit cfd06775c0
10 changed files with 80 additions and 56 deletions

View File

@@ -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={() => {