Skip to content

Commit 6ae7391

Browse files
authored
Merge pull request Aspen-Discovery#1768 from catsoup11789/24.05.00
accessibility updates
2 parents 8d6d725 + ef7d819 commit 6ae7391

File tree

6 files changed

+54
-11
lines changed

6 files changed

+54
-11
lines changed

code/web/interface/themes/responsive/MyAccount/myPreferences.tpl

+15-3
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@
3535
<div class="form-group propertyRow">
3636
<label for="username">{translate text="Username" isPublicFacing=true}</label>
3737
<input type="text" name="username" id="username" value="{$editableUsername|escape}" size="25" minlength="6" maxlength="25" class="form-control">
38-
<a href="#" onclick="$('#usernameHelp').toggle()">{translate text="What is this?" isPublicFacing=true}</a>
38+
<a id="usernameHelpButton" href="#" role="button" aria-controls="usernameHelp" aria-expanded="false"><i class="fa fa-question-circle" role="presentation"></i> {translate text="What is this?" isPublicFacing=true}</a>
3939
<div id="usernameHelp" style="display:none">
40-
{translate text="A username is an optional feature. If you set one, your username will be your alias on hold slips and can also be used to log into your account in place of your card number. A username can be set, reset or removed from the “My Preferences” section of your online account. Usernames must be between 6 and 25 characters (letters and number only, no special characters)." isPublicFacing=true}
40+
<p>{translate text="A username is an optional feature. If you set one, your username will be your alias on hold slips and can also be used to log into your account in place of your card number. A username can be set, reset or removed from the “My Preferences” section of your online account. Usernames must be between 6 and 25 characters (letters and number only, no special characters)." isPublicFacing=true}</p>
4141
</div>
4242
</div>
4343
{/if}
@@ -232,6 +232,18 @@
232232
{* Initiate any checkbox with a data attribute set to data-switch="" as a bootstrap switch *}
233233
{literal}
234234
$(function(){ $('input[type="checkbox"][data-switch]').bootstrapSwitch()});
235+
$("#usernameHelpButton").click(function() {
236+
var helpButton = $(this);
237+
if (helpButton.attr("aria-expanded") === "true") {
238+
$("#usernameHelp").css('display', 'none');
239+
$("#usernameHelpButton").attr("aria-expanded","false");
240+
}
241+
else if (helpButton.attr("aria-expanded") === "false") {
242+
$("#usernameHelp").css('display', 'block');
243+
$("#usernameHelpButton").attr("aria-expanded","true");
244+
}
245+
return false;
246+
})
235247
{/literal}
236248
</script>
237249
{/if}
@@ -241,4 +253,4 @@
241253
</div>
242254
{/if}
243255
</div>
244-
{/strip}
256+
{/strip}

code/web/interface/themes/responsive/Search/Recommend/SideFacets.tpl

+20-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
{foreach from=$sideFacetSet item=cluster key=title name=facetSet}
2222
{if count($cluster.list) > 0}
2323
<div class="facetList">
24-
<div class="facetTitle panel-title {if !empty($cluster.collapseByDefault) && empty($cluster.hasApplied)}collapsed{else}expanded{/if}" onclick="$(this).toggleClass('expanded');$(this).toggleClass('collapsed');$('#facetDetails_{$title}').toggle()" onkeypress="$(this).toggleClass('expanded');$(this).toggleClass('collapsed');$('#facetDetails_{$title}').toggle()" tabindex="0" role="group">
24+
<div id="facetToggle_{$title}" aria-controls="facetDetails_{$title}" class="facetTitle panel-title {if !empty($cluster.collapseByDefault) && empty($cluster.hasApplied)}collapsed{else}expanded{/if}" tabindex="0" role="button" aria-expanded="{if !empty($cluster.collapseByDefault) && empty($cluster.hasApplied)}false{else}true{/if}">
2525
{translate text=$cluster.label isPublicFacing=true}
2626

2727
{if !empty($cluster.canLock)}
@@ -32,7 +32,7 @@
3232
{/if}
3333

3434
</div>
35-
<div id="facetDetails_{$title}" class="facetDetails" {if !empty($cluster.collapseByDefault) && empty($cluster.hasApplied)}style="display:none"{/if}>
35+
<div id="facetDetails_{$title}" class="facetDetails" {if !empty($cluster.collapseByDefault) && empty($cluster.hasApplied)}style="display:none"{/if} role="region" aria-labelledby="facetToggle_{$title}">
3636

3737
{if $title == 'publishDate' || $title == 'birthYear' || $title == 'deathYear' || $title == 'publishDateSort'}
3838
{include file="Search/Recommend/yearFacetFilter.tpl" cluster=$cluster title=$title}
@@ -51,6 +51,24 @@
5151
{/if}
5252
</div>
5353
</div>
54+
<script type="text/javascript">
55+
{* Initiate any checkbox with a data attribute set to data-switch="" as a bootstrap switch *}
56+
{literal}
57+
$("#facetToggle_{/literal}{$title}{literal}").click(function() {
58+
var toggleButton = $(this);
59+
$(this).toggleClass('expanded');
60+
$(this).toggleClass('collapsed');
61+
$('#facetDetails_{/literal}{$title}{literal}').toggle()
62+
if (toggleButton.attr("aria-expanded") === "true") {
63+
$(this).attr("aria-expanded","false");
64+
}
65+
else if (toggleButton.attr("aria-expanded") === "false") {
66+
$(this).attr("aria-expanded","true");
67+
}
68+
return false;
69+
})
70+
{/literal}
71+
</script>
5472
{/if}
5573
{/foreach}
5674
</div>

code/web/interface/themes/responsive/js/aspen.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

code/web/interface/themes/responsive/js/aspen/base.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,7 @@ var AspenDiscovery = (function(){
723723

724724
// If the scroll value is greater than the window height, let's add a class to the scroll-to-top button to show it!
725725
if (y > 0) {
726-
scrollToTopButton.className = "top-link show";
726+
scrollToTopButton.className = "top-link show hidden-xs hidden-sm";
727727
} else {
728728
scrollToTopButton.className = "top-link hide";
729729
}

code/web/release_notes/24.05.00.MD

+13-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
## Aspen LiDA Updates
2-
-
2+
- If a format is not found in ILS Indexing Format Mapping table, Aspen LiDA will now assume the hold type is bib, instead of item, matching functionality to Aspen Discovery. (Ticket 125902) (*KK*)
3+
- Fixed a bug where tapping on some browse category headings would cause the app to crash when loading results. (Ticket 130596) (*KK*)
34

45
## Aspen Discovery Updates
56
//mark
@@ -33,8 +34,18 @@
3334
- Remove unused/unmaintained Horizon Export. (*MDN*)
3435

3536
//kirstien
36-
### Other
37+
### API Updates
38+
- In the Item API, getRecords will now return the hold type for the format and variation IDs. (*KK*)
39+
- In the Item API, the default hold type is now 'bib' for getRecords and getVariations to match functionality of Aspen Discovery when formats are not found in the ILS Indexing Format Mapping table. (*KK*)
40+
41+
### Accessibility Updates
3742
- In the search sidebar the Applied Filters and Narrow Your Results headings have been updated to H3 elements for better structure and accessibility. (*KK*)
43+
- Added aria-expanded attributes to filter headings in the search sidebar for better accessibility. (*KK*)
44+
- The "Go to Top" button will no longer display on tablets and phone devices due to the size causing issues for using Aspen Discovery. (*KK*)
45+
- Added the aria-expanded attribute to the "What's this?" link on My Preferences page for better accessibility. (*KK*)
46+
47+
### Other Updates
48+
- Web Builder page cells will now again save the custom color scheme. (Tickets 129813, 130819) (*KK*)
3849

3950
//kodi
4051
### Events

code/web/sys/WebBuilder/PortalCell.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ class PortalCell extends DataObject {
3434
public $pdfView;
3535
public $imgAction;
3636
public $imgAlt;
37+
public $colorScheme;
38+
public $invertColor;
3739

3840
public function getUniquenessFields(): array {
3941
return [
@@ -43,7 +45,7 @@ public function getUniquenessFields(): array {
4345
}
4446

4547
public function getNumericColumnNames(): array {
46-
return ['frameHeight'];
48+
return ['frameHeight', 'invertColor'];
4749
}
4850

4951
static function getObjectStructure($context = ''): array {

0 commit comments

Comments
 (0)