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] Search page a11y fixes for tags and framework filter buttons #9429

Merged
merged 4 commits into from
Mar 16, 2023
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
1 change: 1 addition & 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.

1 change: 1 addition & 0 deletions src/Bootstrap/less/theme/base.less
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,7 @@ img.reserved-indicator-icon {
}

li.package-tags {
display: block;
advay26 marked this conversation as resolved.
Show resolved Hide resolved
overflow-y: visible;
}
}
Expand Down
4 changes: 4 additions & 0 deletions src/NuGetGallery/Scripts/gallery/page-list-packages.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,14 @@ $(function() {
expandButton.classList.toggle('ms-Icon--ChevronUp');

if (this.classList.contains('active')) {
this.setAttribute("aria-expanded", "true");

dataTab.style.display = 'block';
dataTab.style.maxHeight = dataTab.scrollHeight + "px";
}
else {
this.setAttribute("aria-expanded", "false");

dataTab.style.display = 'none';
dataTab.style.maxHeight = 0;
}
Expand Down
3 changes: 2 additions & 1 deletion src/NuGetGallery/Views/Shared/ListPackages.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
<div class="frameworkgoup">
<input type="checkbox" id="@(frameworkShortName)" class="framework">
<label for="@(frameworkShortName)">@(frameworkDisplayName)</label>
<button type="button" class="collapsible" tab="@(frameworkShortName)" tabindex="0" aria-label="shows and hides TFM filters">
<button type="button" class="collapsible" tab="@(frameworkShortName)" tabindex="0"
aria-label="shows and hides TFM filters for @(frameworkDisplayName)" aria-expanded="false" aria-controls="@(frameworkShortName)tab">
<i class="ms-Icon ms-Icon--ChevronDown" id="@(frameworkShortName)button"></i>
</button>
<div class="tfmTab" id="@(frameworkShortName)tab">
Expand Down
5 changes: 2 additions & 3 deletions src/NuGetGallery/Views/Shared/_ListPackage.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
href="@Url.Package(Model.Id, Model.UseVersion ? Model.Version : null).TrimEnd('/')"
@if (itemIndex.HasValue)
{
@:data-track="@eventName" data-track-value="@itemIndex"
@:data-package-id="@Model.Id" data-package-version="@Model.Version" data-use-version="@Model.UseVersion"
@:data-track="@eventName" data-track-value="@itemIndex"
@:data-package-id="@Model.Id" data-package-version="@Model.Version" data-use-version="@Model.UseVersion"
}
>@Html.BreakWord(Model.Id)</a>

Expand Down Expand Up @@ -93,7 +93,6 @@
</li>
@if (Model.Tags.AnySafe())
{
<br/>
<li class="package-tags">
<span class="icon-text">
<i class="ms-Icon ms-Icon--Tag" aria-hidden="true"></i>
Expand Down