Skip to content

Commit

Permalink
Merged in bugfix/SHIBUI-1010 (pull request #258)
Browse files Browse the repository at this point in the history
SHIBUI-1010: Removed redundant ARIA roles and attributes (if button is semantic, does not need the role of button, etc.);

Approved-by: Ryan Mathis <rmathis@unicon.net>
  • Loading branch information
Jodie Muramoto authored and rmathis committed Dec 10, 2018
2 parents bcaefec + 761f9ed commit eb35a8b
Show file tree
Hide file tree
Showing 15 changed files with 20 additions and 27 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"properties": {
"name": {
"title": "label.metadata-provider-name-display-only",
"description": "tooltip.metadata-provider-name",
"description": "tooltip.metadata-provider-name-display-only",
"type": "string",
"widget": {
"id": "string",
Expand Down
3 changes: 1 addition & 2 deletions ui/src/app/app.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
<button
class="btn btn-outline-primary btn-sm"
id="addNewDropdown"
role="button"
aria-haspopup="true"
aria-expanded="false"
ngbDropdownToggle>
Expand Down Expand Up @@ -57,7 +56,7 @@
</ul>
</div>
</nav>
<main role="main">
<main>
<router-outlet></router-outlet>
<notification-list></notification-list>
</main>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<div class="row">
<div class="col-xl-6 col-xs-12" *ngFor="let sections of columns">
<section class="px-3" *ngFor="let section of sections; let i = index;" role="list">
<button (click)="gotoPage(section.id)" class="tag tag-success tag-sm my-4 text-left" [attr.aria-label]="section.label | translate" role="button">
<section class="px-3" *ngFor="let section of sections; let i = index;">
<button (click)="gotoPage(section.id)" class="tag tag-success tag-sm my-4 text-left" [attr.aria-label]="section.label | translate">
<span class="index">{{ section.pageNumber }}</span>
<translate-i18n [key]="section.label">{{ section.label }}</translate-i18n>
</button>
<ng-container *ngFor="let prop of section.properties">
<summary-property [property]="prop" role="listitem"></summary-property>
<summary-property [property]="prop"></summary-property>
</ng-container>
</section>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="container-fluid p-3" role="main">
<div class="container-fluid p-3" role="section">
<section class="section">
<div class="section-header bg-info p-2 text-white">
<div class="row justify-content-between">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="container-fluid p-3" role="main">
<div class="container-fluid p-3" role="section">
<section class="section">
<div class="section-header bg-info p-2 text-white">
<div class="row justify-content-between">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="container-fluid p-3" role="main">
<div class="container-fluid p-3" role="section">
<ul class="nav nav-tabs">
<li class="nav-item">
<a class="nav-link" [routerLink]="['./', 'resolvers']" routerLinkActive="active" translate="label.metadata-sources">Metadata Sources</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
</div>
</div>
<div class="section-body p-4 border border-top-0 border-info">
<div class="container-fluid p-3" role="main">
<div class="container-fluid p-3">
<wizard
(onNext)="next()"
(onPrevious)="previous()"
(onSave)="save()"></wizard>
(onSave)="save()"
role="navigation"></wizard>
<hr />
<div class="row">
<div class="col col-xl-6 col-lg-9 col-xs-12">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ <h3 class="tag tag-primary">
</h3>
</li>
<li class="nav-item">
<button class="nav-link next btn clearfix" (click)="next()" [disabled]="providerForm.invalid" aria-label="Next: Step 2, Organization information" role="button">
<button class="nav-link next btn clearfix" (click)="next()" [disabled]="providerForm.invalid" aria-label="Next: Step 2, Organization information">
<span class="label pull-left">
2.
<translate-i18n key="label.org-info">Organization Information</translate-i18n>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="container-fluid p-3" role="main">
<div class="container-fluid p-3" role="section">
<section class="section" aria-label="Add a new metadata source - how are you adding the metadata information?" tabindex="0">
<div class="section-header bg-info p-2 text-white">
<div class="row justify-content-between">
Expand All @@ -10,7 +10,7 @@
<div class="section-body p-4 border border-top-0 border-info">
<ul class="nav nav-wizard m-3">
<li class="nav-item">
<button class="nav-link previous btn clearfix" role="button" [routerLink]="['../']">
<button class="nav-link previous btn clearfix" [routerLink]="['../']">
<span class="direction pull-left">
<i class="fa fa-fw fa-arrow-circle-left d-block fa-2x"></i>
<translate-i18n key="action.back">Back</translate-i18n>
Expand All @@ -27,7 +27,7 @@ <h3 class="tag tag-primary">
</h3>
</li>
<li class="nav-item">
<button class="nav-link save btn" aria-label="Save" role="button" (click)="onSave(resolver)" [disabled]="saving$ | async">
<button class="nav-link save btn" aria-label="Save" (click)="onSave(resolver)" [disabled]="saving$ | async">
<span class="label pull-left" translate="action.save">Save</span>
<span class="direction pull-right">
<i class="fa fa-fw next d-block fa-2x"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ <h3 class="tag tag-primary">
</h3>
</li>
<li class="nav-item">
<button class="nav-link next btn clearfix" (click)="next()" [disabled]="providerForm.invalid" aria-label="Next: Step 2, Organization information"
role="button">
<button class="nav-link next btn clearfix" (click)="next()" [disabled]="providerForm.invalid" aria-label="Next: Step 2, Organization information">
<span class="label pull-left" translate="label.finish-summary-validation">
Finished!
</span>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="container-fluid p-3" role="main">
<div class="container-fluid p-3" role="section">
<section class="section" aria-label="Add a new metadata source - how are you adding the metadata information?" tabindex="0">
<div class="section-header bg-info p-2 text-white">
<div class="row justify-content-between">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ <h3 class="tag tag-primary">
</h3>
</li>
<li class="nav-item">
<button class="nav-link next btn clearfix" (click)="save()" [disabled]="providerForm.invalid" aria-label="Save metadata resolver" role="button">
<button class="nav-link next btn clearfix" (click)="save()" [disabled]="providerForm.invalid" aria-label="Save metadata resolver">
<span class="label pull-left" translate="action.save">
Save
</span>
Expand Down
1 change: 0 additions & 1 deletion ui/src/app/shared/autocomplete/autocomplete.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
class="form-control"
autoComplete="off"
type="text"
role="textbox"
[attr.aria-activedescendant]="activeDescendant"
[placeholder]="placeholder"
attr.aria-owns="{{ id }}__listbox"
Expand Down
2 changes: 0 additions & 2 deletions ui/src/app/shared/component/info-icon.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
[ngbPopover]="tooltipContent"
[triggers]="triggers"
[placement]="placement"
[attr.aria-flowto]="id"
role="tooltip"
container="body">
<i class="fa fa-fw fa-info-circle text-primary fa-lg"></i>
<span class="sr-only" translate="tooltip.instruction"></span>
Expand Down
7 changes: 2 additions & 5 deletions ui/src/app/wizard/component/wizard.component.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<nav *ngIf="(current$ | async) && (index$ | async)">
<ul class="nav nav-wizard">
<li class="nav-item" *ngIf="(previous$ | async)">
<button class="nav-link previous btn clearfix" (click)="onPrevious.emit(previousPage.index)" [disabled]="disabled$ | async"
[attr.aria-label]="previousPage.path" role="button">
<button class="nav-link previous btn clearfix" (click)="onPrevious.emit(previousPage.index)" [disabled]="disabled$ | async" [attr.aria-label]="previousPage.path">
<span class="direction pull-left">
<i class="fa fa-fw fa-arrow-circle-left d-block fa-2x"></i>
<translate-i18n key="action.back">Back</translate-i18n>
Expand All @@ -28,8 +27,7 @@ <h3 class="tag tag-primary">
</h3>
</li>
<li class="nav-item" *ngIf="(next$ | async)">
<button class="nav-link next btn clearfix" (click)="onNext.emit(nextPage.index)" [disabled]="disabled$ | async" [attr.aria-label]="nextPage.path"
role="button">
<button class="nav-link next btn clearfix" (click)="onNext.emit(nextPage.index)" [disabled]="disabled$ | async" [attr.aria-label]="nextPage.path">
<span class="label pull-left">
<ng-container *ngIf="(next$ | async).index">{{ (next$ | async).index }}. </ng-container>
{{ (next$ | async).label | translate }}
Expand All @@ -43,7 +41,6 @@ <h3 class="tag tag-primary">
<li class="nav-item" *ngIf="(last$ | async)">
<button class="nav-link save btn"
aria-label="Save"
role="button"
[disabled]="disabled$ | async"
(click)="onSave.emit()">
<span class="label pull-left" translate="action.save">
Expand Down

0 comments on commit eb35a8b

Please sign in to comment.