Skip to content

Commit

Permalink
General base CSS updates, Video Gallery Popup fixes, support for link…
Browse files Browse the repository at this point in the history
…s in Expander headings, Card Slider WA enhancement for screen reader focus-detection
  • Loading branch information
ama39 committed Feb 2, 2021
1 parent 99dbe19 commit 1490dd3
Show file tree
Hide file tree
Showing 12 changed files with 272 additions and 85 deletions.
74 changes: 65 additions & 9 deletions css/base.css

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

2 changes: 1 addition & 1 deletion css/base.css.map

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion css/cwd_card_slider.css

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

2 changes: 1 addition & 1 deletion css/cwd_card_slider.css.map

Large diffs are not rendered by default.

17 changes: 17 additions & 0 deletions css/cwd_utilities.css

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

2 changes: 1 addition & 1 deletion css/cwd_utilities.css.map

Large diffs are not rendered by default.

16 changes: 11 additions & 5 deletions js/cwd_card_slider.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* CWD Card Slider (ama39, last update: 10/9/19)
/* CWD Card Slider (ama39, last update: 10/8/20)
-
- Accessibility Notes:
Expand Down Expand Up @@ -171,12 +171,18 @@ jQuery(document).ready(function($) {

// Focus Detection (for keyboard and screen reader)
// -- if cards have focusable elements within, the slider will ensure that these focus events coordinate with the UI (triggering slide sets and pips as needed)
$(this).find('.card *').on('focus', function(e) {

var this_card = $(this).parents('.card').first().index()+1;
$(this).find('.card').attr('tabindex','-1');
$(this).find('.card, .card *').on('focus', function(e) {

if ( $(this).hasClass('card') ) {
var this_card = $(this).index()+1;
}
else {
var this_card = $(this).parents('.card').first().index()+1;
}
var trigger_pip = Math.ceil(this_card / cards_per_screen);
$(viewer).find('.pip').eq(trigger_pip-1).trigger('click');

});

});
Expand Down
Loading

0 comments on commit 1490dd3

Please sign in to comment.