Skip to content

Commit b76fd7f

Browse files
authored
[A11y]Accessibility fixes 2 (#7939)
* Add more desriptions to deprecation dropdowns. * Update gravatar alt text to include username. * Update tab name for documentation types. * Fix "Version" -> "Versions" consistency.
1 parent 51e063c commit b76fd7f

4 files changed

Lines changed: 8 additions & 8 deletions

File tree

src/NuGetGallery/Helpers/GravatarHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public static HtmlString Image(UrlHelper url, string email, string username, int
8484
height=""{size}""
8585
width=""{size}""
8686
title=""{username}""
87-
alt=""gravatar"" />";
87+
alt=""{username} gravatar"" />";
8888

8989
return new HtmlString(html);
9090
}

src/NuGetGallery/Scripts/gallery/common-multi-select-dropdown.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,15 @@ function MultiSelectDropdown(items, singularItemTitle, pluralItemTitle) {
6464
this.toggleLabel = ko.pureComputed(function () {
6565
var chosenItems = self.chosenItems();
6666
if (chosenItems.length === 0) {
67-
return "No " + pluralItemTitle + " selected";
67+
return "Select Versions: No " + pluralItemTitle + " selected";
6868
}
6969

7070
if (chosenItems.length === self.items.length) {
71-
return "All " + pluralItemTitle + " selected";
71+
return "Select Versions: All " + pluralItemTitle + " selected";
7272
}
7373

7474
var itemTitle = chosenItems.length > 1 ? pluralItemTitle : singularItemTitle;
75-
return "Selected " + itemTitle + " " + chosenItems.join(', ');
75+
return "Select Versions: Selected " + itemTitle + " " + chosenItems.join(', ');
7676
}, this);
7777

7878
this.selectAllText = ko.pureComputed(function () {

src/NuGetGallery/Views/Packages/_ImportReadMe.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
aria-controls="@id" role="tab" data-toggle="tab"
77
data-source-type="@sourceType"
88
data-bind="event: { 'show.bs.tab': OnReadmeTabChange }"
9-
aria-label="@title">
9+
aria-label="@label: @title .">
1010
@label
1111
</a>
1212
</li>

src/NuGetGallery/Views/Packages/_ManageDeprecation.cshtml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,19 +39,19 @@
3939
</div>
4040
<div class="form-group unbolded-label">
4141
<label>
42-
<input name="isLegacy" type="checkbox" value="true" data-bind="checked: isLegacy" />
42+
<input name="isLegacy" type="checkbox" value="true" data-bind="checked: isLegacy" aria-label="Select Reason: This package is legacy and is no longer maintained."/>
4343
This package is <b>legacy</b> and is no longer maintained
4444
</label>
4545
</div>
4646
<div class="form-group unbolded-label">
4747
<label>
48-
<input name="hasCriticalBugs" type="checkbox" value="true" data-bind="checked: hasCriticalBugs" />
48+
<input name="hasCriticalBugs" type="checkbox" value="true" data-bind="checked: hasCriticalBugs" aria-label="Select Reason: This package has critical bugs that make it unusable."/>
4949
This package has <b>critical bugs</b> that make it unusable
5050
</label>
5151
</div>
5252
<div class="form-group unbolded-label">
5353
<label>
54-
<input name="isOther" type="checkbox" value="true" data-bind="checked: isOther" />
54+
<input name="isOther" type="checkbox" value="true" data-bind="checked: isOther" aria-label="Select Reason: Other."/>
5555
<b>Other</b>
5656
</label>
5757
</div>

0 commit comments

Comments
 (0)