From 684b6475645d9181b8833a972a84ae9843c32de8 Mon Sep 17 00:00:00 2001
From: Paulina Nogal <pnogal@wisc.edu>
Date: Thu, 23 May 2019 18:55:30 +0000
Subject: [PATCH] Review Skip To Main Content button functionality

---
 package-lock.json                             | 24 ++++++-------------
 package.json                                  |  2 +-
 src/app/core/header/header.component.html     |  4 +++-
 .../degree-planner-view.component.html        |  2 +-
 .../notes-dialog/notes-dialog.component.html  |  4 ++--
 .../term-container.component.html             |  6 ++---
 src/assets/sass/general.scss                  | 16 +++++--------
 src/environments/environment.prod.ts          |  2 +-
 8 files changed, 23 insertions(+), 37 deletions(-)

diff --git a/package-lock.json b/package-lock.json
index 1cf227c..6245b01 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
 {
   "name": "course-search-enroll-fe",
-  "version": "1.0.16",
+  "version": "1.0.17",
   "lockfileVersion": 1,
   "requires": true,
   "dependencies": {
@@ -4004,8 +4004,7 @@
         "ansi-regex": {
           "version": "2.1.1",
           "bundled": true,
-          "dev": true,
-          "optional": true
+          "dev": true
         },
         "aproba": {
           "version": "1.2.0",
@@ -4026,14 +4025,12 @@
         "balanced-match": {
           "version": "1.0.0",
           "bundled": true,
-          "dev": true,
-          "optional": true
+          "dev": true
         },
         "brace-expansion": {
           "version": "1.1.11",
           "bundled": true,
           "dev": true,
-          "optional": true,
           "requires": {
             "balanced-match": "^1.0.0",
             "concat-map": "0.0.1"
@@ -4048,14 +4045,12 @@
         "code-point-at": {
           "version": "1.1.0",
           "bundled": true,
-          "dev": true,
-          "optional": true
+          "dev": true
         },
         "concat-map": {
           "version": "0.0.1",
           "bundled": true,
-          "dev": true,
-          "optional": true
+          "dev": true
         },
         "console-control-strings": {
           "version": "1.1.0",
@@ -4189,7 +4184,6 @@
           "version": "1.0.0",
           "bundled": true,
           "dev": true,
-          "optional": true,
           "requires": {
             "number-is-nan": "^1.0.0"
           }
@@ -4204,7 +4198,6 @@
           "version": "3.0.4",
           "bundled": true,
           "dev": true,
-          "optional": true,
           "requires": {
             "brace-expansion": "^1.1.7"
           }
@@ -4212,8 +4205,7 @@
         "minimist": {
           "version": "0.0.8",
           "bundled": true,
-          "dev": true,
-          "optional": true
+          "dev": true
         },
         "minipass": {
           "version": "2.3.5",
@@ -4324,8 +4316,7 @@
         "number-is-nan": {
           "version": "1.0.1",
           "bundled": true,
-          "dev": true,
-          "optional": true
+          "dev": true
         },
         "object-assign": {
           "version": "4.1.1",
@@ -4477,7 +4468,6 @@
           "version": "3.0.1",
           "bundled": true,
           "dev": true,
-          "optional": true,
           "requires": {
             "ansi-regex": "^2.0.0"
           }
diff --git a/package.json b/package.json
index 2b423bf..1a44660 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "course-search-enroll-fe",
-  "version": "1.0.16",
+  "version": "1.0.17",
   "scripts": {
     "ng": "ng",
     "start": "ng serve --proxy-config proxy.json --open",
diff --git a/src/app/core/header/header.component.html b/src/app/core/header/header.component.html
index 703a17f..18b1637 100644
--- a/src/app/core/header/header.component.html
+++ b/src/app/core/header/header.component.html
@@ -1,4 +1,6 @@
-<a class="show-on-focus" href="#maincontent" id="skip-link">Skip to main content</a>
+<a class="show-on-focus" href="#maincontent">Skip to main content</a>
+<a class="show-on-focus" href="#sidenav-container">Skip to utility menu</a>
+
 <myuw-app-bar
   role="main"
   theme-name=""
diff --git a/src/app/degree-planner/degree-planner-view/degree-planner-view.component.html b/src/app/degree-planner/degree-planner-view/degree-planner-view.component.html
index 45a7739..f78f5ed 100644
--- a/src/app/degree-planner/degree-planner-view/degree-planner-view.component.html
+++ b/src/app/degree-planner/degree-planner-view/degree-planner-view.component.html
@@ -17,7 +17,7 @@
           fxLayoutGap="20px"
           fxLayoutAlign="start center"
           style="margin: 24px 0px 24px 24px;">
-          <h1 class="sr-only" tabindex="0">Degree Planner</h1>
+          <h1 class="sr-only" id="maincontent" tabindex="0">Degree Planner</h1>
           <mat-form-field class="degree-plans-form-field" floatLabel="always">
             <mat-label>Degree Plans</mat-label>
             <mat-select
diff --git a/src/app/degree-planner/dialogs/notes-dialog/notes-dialog.component.html b/src/app/degree-planner/dialogs/notes-dialog/notes-dialog.component.html
index 6e811e7..d81c8b5 100644
--- a/src/app/degree-planner/dialogs/notes-dialog/notes-dialog.component.html
+++ b/src/app/degree-planner/dialogs/notes-dialog/notes-dialog.component.html
@@ -59,8 +59,8 @@
 
     <div id="delete-note-section" *ngIf="data.hasExistingNote">
       <div>
-        <h2>Delete note</h2>
-        <p>Once the note is deleted, there is no going back.</p>
+        <h3>Delete note</h3>
+        <p>This action can not be undone.</p>
       </div>
       <mat-dialog-actions align="end">
         <button
diff --git a/src/app/degree-planner/term-container/term-container.component.html b/src/app/degree-planner/term-container/term-container.component.html
index f06af11..c4caaaf 100644
--- a/src/app/degree-planner/term-container/term-container.component.html
+++ b/src/app/degree-planner/term-container/term-container.component.html
@@ -106,11 +106,10 @@
         <ng-container *ngIf="(note$ | async) as note; else newNote">
           <button
             mat-icon-button
-            aria-label="Open dialog to edit note in this term"
+            attr.aria-label="Edit note for {{ termCode | getTermDescription }}"
             [disabled]="note.isLoaded === false"
             (click)="openNotesDialog(note)">
             <mat-icon
-              aria-label="Open dialog to edit note in this term"
               alt="Edit note"
               color="primary"
               matTooltip="Edit note"
@@ -123,9 +122,8 @@
           <button
             mat-icon-button
             (click)="openNotesDialog()"
-            aria-label="Open dialog to add note in this term">
+            attr.aria-label="Add note to {{ termCode | getTermDescription }}">
             <mat-icon
-              aria-label="Open dialog to add note in this term"
               alt="Add note"
               color="primary"
               matTooltip="Add note"
diff --git a/src/assets/sass/general.scss b/src/assets/sass/general.scss
index 4f2145f..3be8175 100644
--- a/src/assets/sass/general.scss
+++ b/src/assets/sass/general.scss
@@ -268,15 +268,6 @@ body {
   clip: rect(0 0 0 0);
 }
 
-#skip-link {
-  position: absolute !important;
-  z-index: 999;
-  color: #0479a8;
-  padding: 0.7rem 2.2rem;
-  background-color: #fff;
-  font-family: sans-serif;
-}
-
 .show-for-sr,
 .show-on-focus {
   position: absolute !important;
@@ -288,11 +279,16 @@ body {
 
 .show-on-focus:active,
 .show-on-focus:focus {
-  position: static !important;
+  position: absolute !important;
   width: auto;
   height: auto;
   overflow: visible;
   clip: auto;
+  z-index: 999;
+  color: #0479a8;
+  padding: 0.7rem 2.2rem;
+  background-color: #fff;
+  font-family: sans-serif;
 }
 
 .sr-only {
diff --git a/src/environments/environment.prod.ts b/src/environments/environment.prod.ts
index a9c0521..01b61d7 100644
--- a/src/environments/environment.prod.ts
+++ b/src/environments/environment.prod.ts
@@ -1,6 +1,6 @@
 export const environment = {
   production: true,
-  version: '1.0.16',
+  version: '1.0.17',
   apiPlannerUrl: '/api/planner/v1',
   apiSearchUrl: '/api/search/v1',
   apiEnrollUrl: '/api/enroll/v1',
-- 
GitLab