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] Make announcers read the version history table data correctly. #8529

Merged
merged 1 commit into from
Apr 16, 2021
Merged
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
32 changes: 16 additions & 16 deletions src/NuGetGallery/Views/Packages/DisplayPackage.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -726,20 +726,20 @@
<table aria-label="Version History of @Model.Id" class="table borderless">
<thead>
<tr>
<th>Version</th>
<th>Downloads</th>
<th>Last updated</th>
<th scope="col">Version</th>
<th scope="col">Downloads</th>
<th scope="col">Last updated</th>
@if (Model.CanDisplayPrivateMetadata)
{
<th>Status</th>
<th scope="col">Status</th>
}
@if (Model.IsCertificatesUIEnabled)
{
<th aria-hidden="true" abbr="Signature Information"></th>
<th scope="col" aria-hidden="true" abbr="Signature Information"></th>
}
@if (Model.IsPackageDeprecationEnabled || Model.IsPackageVulnerabilitiesEnabled)
{
<th aria-hidden="true" abbr="Package Warnings"></th>
<th scope="col" aria-hidden="true" abbr="Package Warnings"></th>
}
</tr>
</thead>
Expand All @@ -759,15 +759,15 @@
rowCount++;
@VersionListDivider(rowCount, versionsExpanded)
<tr class="@(packageVersion.IsCurrent(Model) ? "bg-info" : null)">
<td>
<td tabindex="0">
<a href="@Url.Package(packageVersion)" title="@packageVersion.FullVersion">
@packageVersion.Version.Abbreviate(30)
</a>
</td>
<td>
<td tabindex="0">
@packageVersion.DownloadCount.ToNuGetNumberString()
</td>
<td>
<td tabindex="0">
<span data-datetime="@packageVersion.LastUpdated.ToString("O")">@packageVersion.LastUpdated.ToNuGetShortDateString()</span>
@if (packageVersion.PushedBy != null)
{
Expand All @@ -780,7 +780,7 @@
{
var packageStatusSummary = packageVersion.PackageStatusSummary;

<td>
<td tabindex="0">
@if (packageStatusSummary == PackageStatusSummary.Listed ||
packageStatusSummary == PackageStatusSummary.Unlisted)
{
Expand All @@ -801,7 +801,7 @@
}
else
{
<td class="package-icon-cell">
<td tabindex="0" class="package-icon-cell">
<i class="ms-Icon ms-Icon--Ribbon package-icon" title="@packageVersion.SignatureInformation"></i>
</td>
}
Expand All @@ -813,7 +813,7 @@
}
else
{
<td class="package-icon-cell">
<td tabindex="0" class="package-icon-cell">
<i class="ms-Icon ms-Icon--Warning package-icon" title="@packageVersion.PackageWarningIconTitle"></i>
</td>
}
Expand All @@ -824,16 +824,16 @@
rowCount++;
@VersionListDivider(rowCount, versionsExpanded)
<tr class="deleted">
<td class="version">
<td tabindex="0" class="version">
@packageVersion.Version
</td>
<td>
<td tabindex="0">
@packageVersion.DownloadCount
</td>
<td>
<td tabindex="0">
<span data-datetime="@packageVersion.LastUpdated.ToString("O")">@packageVersion.LastUpdated.ToNuGetShortDateString()</span>
</td>
<td>
<td tabindex="0">
Deleted
</td>
<td colspan="2"></td>
Expand Down