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

[A11y]Enable horizontal scrollbar on cert table #8340

Merged
merged 1 commit into from
Dec 2, 2020
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/Bootstrap/dist/css/bootstrap-theme.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions src/Bootstrap/less/theme/base.less
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,10 @@ img.reserved-indicator-icon {
margin-right: auto;
}

.table-container {
overflow-x: auto;
}

.package-list {
margin-top: 8px;
margin-bottom: 8px;
Expand Down
57 changes: 29 additions & 28 deletions src/NuGetGallery/Views/Shared/_AccountCertificates.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -78,37 +78,38 @@

<div data-bind="if: $data && $data.hasCertificates && $data.hasCertificates()">
<div class="panel-collapse collapse in" aria-expanded="true">
<table class="table" role="list">
<thead>
<tr class="manage-certificate-headings">
<th>Fingerprint (SHA-256)</th>
<th>Subject</th>
<th>Expiration</th>
<th>Issuer</th>
<th><span class="hidden">Icon</span></th>
</tr>
</thead>
<tbody data-bind="foreach: $data.certificates">
<tr class="manage-certificate-listing" role="listitem">
<td><samp class="small-fingerprint break-word" data-bind="text: Thumbprint"></samp></td>
<td data-bind="text: ShortSubject, attr: { title: Subject }"></td>
<td data-bind="text: ExpirationDisplay, attr: {
<div class="table-container">
<table class="table" role="list">
<thead>
<tr class="manage-certificate-headings">
<th>Fingerprint (SHA-256)</th>
<th>Subject</th>
<th>Expiration</th>
<th>Issuer</th>
<th><span class="hidden">Icon</span></th>
</tr>
</thead>
<tbody data-bind="foreach: $data.certificates">
<tr class="manage-certificate-listing" role="listitem">
<td><samp class="small-fingerprint break-word" data-bind="text: Thumbprint"></samp></td>
<td data-bind="text: ShortSubject, attr: { title: Subject }"></td>
<td data-bind="text: ExpirationDisplay, attr: {
title: IsExpired ? 'This certificate\'s expiration date is in the past. Future packages signed with this certificate will fail validation. Upload a renewed certificate to enable signed package uploads.' : ExpirationIso,
class: IsExpired ? 'expired-certificate' : ''
}">
</td>
<td data-bind="text: ShortIssuer, attr: { title: Issuer }"></td>
<td class="text-right align-middle package-controls">
<span data-bind="visible: CanDelete">
<a class="btn" title="Delete certificate" tabindex="0" data-bind="attr: { 'data-href': DeleteUrl, 'aria-label': 'Delete certificate' }, click: $parent.deleteCertificate">
<i class="ms-Icon ms-Icon--Delete" aria-hidden="true"></i>
</a>
</span>
</td>
</tr>
</tbody>
</table>

</td>
<td data-bind="text: ShortIssuer, attr: { title: Issuer }"></td>
<td class="text-right align-middle package-controls">
<span data-bind="visible: CanDelete">
<a class="btn" title="Delete certificate" tabindex="0" data-bind="attr: { 'data-href': DeleteUrl, 'aria-label': 'Delete certificate' }, click: $parent.deleteCertificate">
<i class="ms-Icon ms-Icon--Delete" aria-hidden="true"></i>
</a>
</span>
</td>
</tr>
</tbody>
</table>
</div>
<p>
The SHA-256 fingerprint can be found by calculating the SHA-256 hash of the DER encoded
certificate file (.cer). The fingerprint should be hex-encoded. This can be done with a variety
Expand Down