You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Why these changes are being introduced:
This application has many focusable elements, and it may be helpful
to users navigating with keyboards or screen readers if we provide
links to skip to different sections.
Relevant ticket(s):
* [GDT-161](https://mitlibraries.atlassian.net/browse/GDT-161)
How this addresses that need:
This adds the following skip links to the `_skip_links` partial:
* All views: nav, search form
* Results: results list, filter sidebar
* Record: record metadata
It also adds `.skip-link` rules to our SCSS, copied from the
`#skip` rules in the style guide with two changes:
* The `width: 0` rule has been removed in a step towards partial
Safari support, as Safari will not focus on elements with this
rule.
* The color of skip links on focus is now white, as the current
blue-on-black is a contrast error.
Safari has a significant focus bug that Apple seems unlikely to fix.
[This article](https://itnext.io/fixing-focus-for-safari-b5916fef1064)
details the problem and provides a polyfill that solves it. As this
bug likely affects all of our applications, we should incorporate
that polyfill in the style guide. I've opened [ENGX-260](https://mitlibraries.atlassian.net/browse/ENGX-260)
to do so.
Side effects of this change:
* Some IDs have been added to top-level elements to make them
selectable.
* While working on this, I realized that VoiceOver doesn't recognize
the filter labels as disclosure triangles, so even when they are
closed, it tabs through every available filter. I've fixed this
in a subsequent commit.
* There is an open question as to whether this is too many skip
links. [WebAIM's guidance on skip links](https://webaim.org/techniques/skipnav/#multiple)
suggests that one is optimal, but more than one may be necessary
in some cases. Whether our use case necessitates them is somewhat
unclear, as are the best practices for how many links to provide
if you are providing multiple. I plan to discuss this further with
Darcy in UX review. If we can't come to a decision, it would be a
good question for DAS.
0 commit comments