Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should the current location on a breadcrumb trail be an <a> anchor element? #3047

Open
verdansk opened this issue Jun 24, 2024 · 4 comments
Open
Labels
Feedback Issue raised by or for collecting input from people outside APG task force Pattern Page Related to a page documenting a Pattern question Issue asking a question

Comments

@verdansk
Copy link

Issue

There are two accessibility documents conflicting on the topic of implementing breadcrumbs. From these docs it's unclear on how the last item in the breadcrumb list should be structured.


Example 1

In this example the last item is structured as an <a> anchor-element together with the aria-current-attirbute:

// Example from: https://www.w3.org/WAI/ARIA/apg/patterns/breadcrumb/examples/breadcrumb/
<nav aria-label="Breadcrumb" class="breadcrumb">
  <ol>
    <li>
      <a href="../../../..">
        WAI-ARIA Authoring Practices Guide (APG)
      </a>
    </li>
    <li>
      <a href="../../../">
        Patterns
      </a>
    </li>
    <li>
      <a href="../../">
        Breadcrumb Pattern
      </a>
    </li>
    <li>
      <a href="" aria-current="page">
        Breadcrumb Example
      </a>
    </li>
  </ol>
</nav>

Example2

However in this document the last item on the breadcrumb trail should not be an <a> anchor element, as we can digest from the test-scenarios (5a, 5b). But also from the third example.

Procedure
When breadcrumb trails have been implemented in a set of Web pages:

  1. Navigate to a Web page.
  2. Check that a breadcrumb trail is displayed.
  3. Check that the breadcrumb trail displays the correct navigational sequence to reach the current location or the correct hierarchical path to the current location within the site structure.
  4. For a breadcrumb trail that does not include the current location:
    a. Check that all elements in the breadcrumb trail are implemented as links.
  5. For a breadcrumb trail that does include the current location:
    a. Check that all elements except for the current location are implemented as links.
    b. Check that the current location is not implemented as a link.
  6. Check that all links navigate to the correct Web page as specified by the breadcrumb trail.

Question

So this leaves me with the question what the accessibility best practices should be when it comes to the last item on a breadcrumb trail? From a UX-perspective I can see why it should be an <a> anchor-element, so that it can be focusable, but on the other hand it doesn't make sense to have an empty <a> anchor-element or even a link to the current page in the breadcrumb trail. As I don't see the added value of having those.

Anybody who can shed some light on this?

@css-meeting-bot
Copy link
Member

The ARIA Authoring Practices (APG) Task Force just discussed Should the current location on a breadcrumb trail be an anchor element?.

The full IRC log of that discussion <jugglinmike> Topic: Should the current location on a breadcrumb trail be an anchor element?
<jugglinmike> github: https://github.com//issues/3047
<jugglinmike> Matt_King: I remember discussing this concern when we made this example
<jugglinmike> Matt_King: There have been a variety of opinions, and I don't know if there is a right or wrong answer
<jugglinmike> Matt_King: It kind of feels as though the answer may be more of a design decision that is based on the structure of the curent site
<jugglinmike> s/curent/current/
<jugglinmike> Matt_King: I've seen some that don't include the current page at all
<jugglinmike> Matt_King: WCAG has a document that may be relevant, "G65: Providing a breadcrumb trail"
<Jem> https://www.w3.org/TR/WCAG20-TECHS/G65.html
<jugglinmike> Jem: 2.4.8 seems relevant
<jugglinmike> Jem: My vote is to not add the anchor tag. What do other folks?
<jugglinmike> CurtBellew: I'd like to put aria-current on it
<jugglinmike> Matt_King: I like that, too, though aria-current works better on a link. aria-current on a word doesn't have any meaning to it
<jugglinmike> Matt_King: The second example on WCAG includes the current page as a link, but it doesn't say *not* to do that
<jugglinmike> Mark_McCarthy: there isn't anything that says *not* to use links. It seems like a design decision for authors
<jugglinmike> s/for authors/that authors are expected to make/
<jugglinmike> Matt_King: So perhaps APG doesn't need to make a recommendation about this
<jugglinmike> howard-e: For what it's worth, at the bottom of the WCAG page, there's a note that reads "failing this test procedure does not necessarily mean that the success criterion has not been satisfied in some other way, only that this technique has not been successfully implemented and can not be used to claim conformance."
<jugglinmike> Matt_King: That's an interesting wording
<jugglinmike> Matt_King: That statement applies to the entire list which precedes it
<jugglinmike> Matt_King: Does the Task Force actually agree that WCAG should be so prescriptive about bread crumbs? Maybe we should raise an issue here...
<jugglinmike> Matt_King: The first words are a little weird: "If this is a sufficient technique for a success criterion"
<jugglinmike> Matt_King: I don't know what that condition means
<jugglinmike> Matt_King: Apparently, they must include insufficient techniques
<jugglinmike> Matt_King: It's essentially saying, "if you fail these checks, this technique has not been successfully implemented"
<jugglinmike> Matt_King: "...and cannot be used to claim conformance"
<jugglinmike> Matt_King: That would mean that if someone built breadcrumbs like the APG's, their implementation would be invalid
<jugglinmike> Matt_King: I do think that statement on the WCAG is authoritative
<Jem> https://www.w3.org/WAI/WCAG22/Techniques/general/G65
<jugglinmike> Matt_King: With that understanding, do we think that the APG bread crumb that this Task Force has previously reviewed and approved--do we think that decision needs to be revisited based on this reading of WCAG?
<jugglinmike> Jem: They have versions of this technique in 2.0 and 2.2
<jugglinmike> Matt_King: For my part, I don't think we should revisit the validity of the APG bread crumb example. If people implement bread crumbs the way they are implemented in APG, they should be considered valid by WCAG
<jugglinmike> Jem: I'm fine with that
<jugglinmike> Mark_McCarthy: I agree that we don't need to re-assess. I think the current implementation is fine
<jugglinmike> CurtBellew: I concur. In fact, I prefer the APG implementation
<jugglinmike> Matt_King: Okay, then I may use this Task Force's agreement in an issue raised with WCAG
<Jem> https://github.com/w3c/wcag/issues/new
<Jem> https://www.w3.org/WAI/WCAG22/Techniques/general/G65#tests
<jugglinmike> Zakim, end the meeting

@mcking65
Copy link
Contributor

mcking65 commented Jul 5, 2024

@mcking65 mcking65 added question Issue asking a question Feedback Issue raised by or for collecting input from people outside APG task force Pattern Page Related to a page documenting a Pattern labels Jul 5, 2024
@mcking65
Copy link
Contributor

mcking65 commented Jul 5, 2024

@verdansk

Thank you for the question. If the meeting minutes and issue I raised regarding WCAG technique G65 do not provide a sufficient answer, please feel free to re-open this issue.

@mcking65
Copy link
Contributor

Waiting for publication of this merged pull request:
Update G65.html by scottaohara · Pull Request #3951 · w3c/wcag

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feedback Issue raised by or for collecting input from people outside APG task force Pattern Page Related to a page documenting a Pattern question Issue asking a question
Development

No branches or pull requests

3 participants