Skip to content

Commit

Permalink
[A11y] Fix Framework filter tooltip's confusing double behavior (#9454)
Browse files Browse the repository at this point in the history
* Fixed tooltip's confusing double behavior (kinda)

* removed extra tab index
  • Loading branch information
advay26 committed Apr 6, 2023
1 parent 32e13ba commit 2a9a353
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 18 deletions.
1 change: 0 additions & 1 deletion src/NuGetGallery/Scripts/gallery/page-list-packages.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ $(function() {
'use strict';

$(".reserved-indicator").each(window.nuget.setPopovers);
$(".framework-filter-info-icon").each(window.nuget.setPopovers);

const searchForm = document.forms.search;
const allFrameworks = document.querySelectorAll('.framework');
Expand Down
9 changes: 0 additions & 9 deletions src/NuGetGallery/Strings.Designer.cs

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

3 changes: 0 additions & 3 deletions src/NuGetGallery/Strings.resx
Original file line number Diff line number Diff line change
Expand Up @@ -1254,7 +1254,4 @@ The {1} Team</value>
<data name="ForgotPassword_Disabled_Error" xml:space="preserve">
<value>Forgot password is disabled.</value>
</data>
<data name="FrameworkFilterInformation_Tooltip" xml:space="preserve">
<value>Filters packages based on the target frameworks included in the NuGet Package.</value>
</data>
</root>
2 changes: 1 addition & 1 deletion src/NuGetGallery/ViewModels/PackageListViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,6 @@ public PackageListViewModel(

public Dictionary<string, FrameworkFilterHelper.FrameworkFilterGroup> FrameworkFilters = FrameworkFilterHelper.FrameworkFilters;

public string TargetFrameworkInformationLink = "https://learn.microsoft.com/en-us/dotnet/standard/frameworks";
public string FrameworksFilteringInformationLink = "https://learn.microsoft.com/nuget/consume-packages/finding-and-choosing-packages#advanced-filtering-and-sorting";
}
}
6 changes: 2 additions & 4 deletions src/NuGetGallery/Views/Shared/ListPackages.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,8 @@
<fieldset id="frameworkfilters">
<legend>
Frameworks
<a href="@(Model.TargetFrameworkInformationLink)" title="Frameworks filter information">
<i class="framework-filter-info-icon ms-Icon ms-Icon--Info" tabindex="0"
data-content="@Strings.FrameworkFilterInformation_Tooltip"
alt="@Strings.FrameworkFilterInformation_Tooltip"></i>
<a href="@(Model.FrameworksFilteringInformationLink)" title="Filters packages based on the target frameworks included in the NuGet Package. Click here to learn more.">
<i class="framework-filter-info-icon ms-Icon ms-Icon--Info"></i>
</a>
</legend>
@foreach (var framework in Model.FrameworkFilters.Values)
Expand Down

0 comments on commit 2a9a353

Please sign in to comment.