Skip to content
Snippets Groups Projects
Commit 2d8cf52b authored by Isaac Evavold's avatar Isaac Evavold
Browse files

remove the tabindex attr from non-interactive DOM elements

These changes follow guidance from Sandi and from the general DOM specification that the `tabindex` attribute (along with Angular's `isFocusable` and `isTabbable` attributes) should only be included on elements that can be interacted with via mouse clicks or keyboard input.

A number of elements in the degree planner view were non-interactive by design but still were in tabbable. This commit removes tabbing from those non-interactive elements.
parent cbc55bd7
No related branches found
No related tags found
No related merge requests found
<div class="alert-banner" tabindex="0"> <div class="alert-banner">
<p><md-icon class="material-icons error" role="img" aria-hidden="true">warning</md-icon> Course Search & Enroll will not be available from June 28 at 4:00pm to July 8 at 8:00am due to the <a href="https://upgrade.sis.wisc.edu/" target="_blank">SIS Upgrade.</a></p> <p><md-icon class="material-icons error" role="img" aria-hidden="true">warning</md-icon> Course Search & Enroll will not be available from June 28 at 4:00pm to July 8 at 8:00am due to the <a href="https://upgrade.sis.wisc.edu/" target="_blank">SIS Upgrade.</a></p>
</div> </div>
<header ngClass.sm="hide-navigation-bar" ngClass.xs="hide-navigation-bar" role="banner"> <header ngClass.sm="hide-navigation-bar" ngClass.xs="hide-navigation-bar" role="banner">
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
fxLayoutGap="20px" fxLayoutGap="20px"
fxLayoutAlign="start center" fxLayoutAlign="start center"
style="margin: 24px 0px 24px 24px;"> style="margin: 24px 0px 24px 24px;">
<h1 class="sr-only" id="maincontent" tabindex="0">Degree Planner</h1> <h1 class="sr-only" id="maincontent">Degree Planner</h1>
<mat-form-field class="degree-plans-form-field" floatLabel="always"> <mat-form-field class="degree-plans-form-field" floatLabel="always">
<mat-label>Degree Plans</mat-label> <mat-label>Degree Plans</mat-label>
<mat-select <mat-select
......
<div class="term-container" <div class="term-container" aria-label="List of saved for later courses" id="saved-courses">
aria-label="List of saved for later courses"
id="saved-courses"
isFocusable="true"
isTabbable="true"
tabindex="0">
<div <div
class="course-list" class="course-list"
cdkDropList cdkDropList
......
...@@ -5,11 +5,7 @@ ...@@ -5,11 +5,7 @@
<h3>Course key</h3> <h3>Course key</h3>
</mat-panel-title> </mat-panel-title>
</mat-expansion-panel-header> </mat-expansion-panel-header>
<mat-list id="course-key-list" role="list" <mat-list id="course-key-list" role="list" aria-label="Course key List">
aria-label="Course key List"
isFocusable="true"
isTabbable="true"
tabindex="0">
<mat-list-item role="listitem"> <mat-list-item role="listitem">
<i <i
aria-hidden="true" aria-hidden="true"
...@@ -55,10 +51,7 @@ ...@@ -55,10 +51,7 @@
<h3>Menu</h3> <h3>Menu</h3>
</mat-panel-title> </mat-panel-title>
</mat-expansion-panel-header> </mat-expansion-panel-header>
<div aria-label="Utility menu items" <div aria-label="Utility menu items">
isFocusable="true"
isTabbable="true"
tabindex="0">
<a mat-button class="sidenav-link-btn" target="_blank" href="/api/degreeplanpdf?roadmapId={{ planId }}&hideGrades={{ !(showGrades$ | async) }}"> <a mat-button class="sidenav-link-btn" target="_blank" href="/api/degreeplanpdf?roadmapId={{ planId }}&hideGrades={{ !(showGrades$ | async) }}">
<i aria-hidden="true" class="material-icons" alt="create pdf">picture_as_pdf</i> <i aria-hidden="true" class="material-icons" alt="create pdf">picture_as_pdf</i>
Create PDF Create PDF
......
<ng-template #enrolled id="enrolled-courses"> <ng-template #enrolled id="enrolled-courses">
<div class="course-list-wrapper"> <div class="course-list-wrapper">
<div class="course-list"> <div class="course-list">
<div class="course-list-inner" <div class="course-list-inner" attr.aria-label="List of courses in {{ termCode | getTermDescription }} term">
attr.aria-label="List of courses in {{ termCode | getTermDescription }} term"
isFocusable="true"
isTabbable="true"
tabindex="0">
<ng-container *ngIf="enrolledCourses.length === 0"> <ng-container *ngIf="enrolledCourses.length === 0">
<p *ngIf="(term$ | async).termCode.isPast()" aria-label="No courses taken" class="no-courses"> <p *ngIf="(term$ | async).termCode.isPast()" aria-label="No courses taken" class="no-courses">
No courses taken No courses taken
...@@ -40,11 +36,7 @@ ...@@ -40,11 +36,7 @@
(cdkDropListDropped)="drop($event)" (cdkDropListDropped)="drop($event)"
(cdkDropListEntered)="dragEnter($event)" (cdkDropListEntered)="dragEnter($event)"
(cdkDropListExited)="dragExit($event)"> (cdkDropListExited)="dragExit($event)">
<div class="course-list-inner term-body" <div class="course-list-inner term-body" attr.aria-label="List of courses in {{ termCode | getTermDescription }} term">
attr.aria-label="List of courses in {{ termCode | getTermDescription }} term"
isFocusable="true"
isTabbable="true"
tabindex="0">
<ng-container <ng-container
*ngIf="plannedCourses.length === 0 && !hasItemDraggedOver"> *ngIf="plannedCourses.length === 0 && !hasItemDraggedOver">
<p *ngIf="(term$ | async).termCode.isActive()" class="no-courses"> <p *ngIf="(term$ | async).termCode.isActive()" class="no-courses">
...@@ -100,11 +92,8 @@ ...@@ -100,11 +92,8 @@
fxLayout="row" fxLayout="row"
class="term-header" class="term-header"
fxLayoutAlign="space-between center" fxLayoutAlign="space-between center"
attr.aria-label="{{ termCode | getTermDescription }} term" attr.aria-label="{{ termCode | getTermDescription }} term">
isFocusable="true" <h3 class="term-description">{{ termCode | getTermDescription }}</h3>
isTabbable="true"
tabindex="0">
<h3 tabindex="0" class="term-description">{{ termCode | getTermDescription }}</h3>
<div fxLayout="row" fxLayoutAlign="space-between center"> <div fxLayout="row" fxLayoutAlign="space-between center">
<p class="text-right semi-bold credits"> <p class="text-right semi-bold credits">
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment