Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accessibility updates for 'delete function' button in FunctionManageComponent #2158

Merged
merged 1 commit into from
Dec 16, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,15 @@ pre {
}

.delete-app {
padding-left: 50px;
margin-left: 50px;
padding: 0 2px 0 0;
display: flex;
border: none;
background: transparent;
}

.icon-small{
margin-right: 5px;
margin-right: 2px;
}

#submit-delete {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
<radio-selector *ngIf="!runtimeVersion" [disabled]="true" [options]="functionStatusOptions" [defaultValue]="!!functionInfo.config.disabled"></radio-selector>
<radio-selector *ngIf="runtimeVersion === 'V1'" [fnWriteAccess]="functionApp" [options]="functionStatusOptions" [defaultValue]="!!functionInfo.config.disabled" (value)="functionStateValueChange.next($event)"></radio-selector>
<radio-selector *ngIf="runtimeVersion === 'V2'" [options]="functionStatusOptions" [defaultValue]="!!functionInfo.config.disabled" (value)="functionStateValueChange.next($event)"></radio-selector>
<span class="clickable delete-app" (click)="deleteFunction()" [fnWriteAccess]="functionApp">
<span load-image="image/delete.svg" class="icon-small"></span>
<button class="delete-app" (click)="deleteFunction()" [fnWriteAccess]="functionApp">
<span load-image="image/delete.svg" class="icon-small" role="presentation"></span>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

role="presentation" [](start = 75, length = 19)

Is this actually necessary? Does the screenreader try to read it or something if it's placed within a focusable element?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on testing with Narrator, setting this attribute doesn't make any difference here since the doesn't contain any text.

(If there were text inside the , Narrator would read it unless the span had role="presentation".)

I will leave it since I'm not entirely sure, and the ARIA documentation states that all children of a element need to be presentational.

{{ 'functionManage_deleteFunction' | translate }}
</span>
</button>
</div>
</div>
</div>
Expand Down