Closed paregorios closed 1 year ago
@paregorios This is up on staging for review.
One question, are you sure we need the href=""
on the current-page link. It makes the link clickable unless we do something like CSS pointer-events: none
? Also, FWIW the USWDS folks seems to think using a span for the current item is OK. They also recommend hiding the separator elements from screen readers (e.g. by putting aria-hidden="true"
on our breadcrumbSeparator
elements, which I think may be a good idea.
@paregorios Should be updated on staging.
@alecpm This is working as desired on staging. Please merge to master and deploy to production.
Looks great on produciton. Thank you.
Remember the contractor NYU hired to tell us what to change and how to change it to make the site WCAG-compliant? Either they led us astray on the proper pattern for breadcrumbs or the ARIA guidance has changed since then. As a result, we are suddenly failing automated checks for accessibility compliance.
Current
We have patterns like this:
Desired
According to the ARIA Authoring Practices Guide (APG), we should follow this breadcrumb pattern instead. My read is that our breadcrumbs should therefore look like this:
Summary of changes
role="breadcrumbs"
from the<nav id="portal-breadcrumbs">
element.aria-label="Breadcrumb"
to the<nav id="portal-breadcrumbs">
element. Note that "Breadcrumb" is title-capitalized and singular.<span id="breadcrumbs-current">
into an<a id="breadcrumbs-current" href="">
element (including matching closing tag).aria-current="page"
attribute to the<a id="breadcrumbs-current" href="">
element.How messy will this be?
The string "breadcrumbs" appears in 12 files in our code: https://github.com/search?q=repo%3Aisawnyu%2Fisaw.web%20breadcrumbs&type=code. I'm not sure which of these are actually used. If they are all used, some of them seem to conform to different, also incorrect patterns. We need one pattern throughout the whole site, compliant with "Desired" above.