Steps to reproduce

User interface changes

Problem/Motivation

In the Default Admin theme, breadcrumb separators (which are forward slashes /) are currently perceivable via keyboard navigation in VoiceOver. This mirrors a known accessibility issue in the Gin admin theme #3506340: [PP-1] Breadcrumb separators are focusable.

Steps to reproduce

1. Set Default Admin as the administration theme.
2. Go to /admin/config/regional/date-time.
3. Use VoiceOver and press VO + Right Arrow to move through the breadcrumb trail.
By default, VO is either Caps Lock or Control-Option.
4. Observe whether breadcrumb separators are exposed as separate navigable items.

Screencast of VoiceOver in Edge with the MR, in dark mode

Proposed resolution

Additional fixes in this MR

  1. There's unused selectors. Claro's .breadcrumb selector still exists, although its not in use. We remove this
  2. There's unneeded specificity. The breadcrumbs do not exist within the toolbar, and do not need the :is(#extra-specificity-hack, [data-drupal-admin-styles]) hack. We remove this additional specifity
  3. The slash doesn't flip for RTL

Remaining tasks

Review

User interface changes

Introduced terminology

NA

API changes

NA

Data model changes

NA

Release notes snippet

NA

Issue fork drupal-3583516

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mgifford created an issue. See original summary.

mgifford’s picture

Issue summary: View changes
kentr’s picture

mgifford’s picture

@mherchel couldn't replicate it at our last meeting, but that wasn't with VoiceOver. We may need to flesh out better testing procedures.

kentr’s picture

I know I'm not even remotely a VoiceOver expert, so this is speculation based on some observations.

To me, it looks like VoiceOver VO Right Arrow is selecting them rather than focusing them. It doesn't look like the same thing as tabbing through interactive elements.

The only way to stop this with the current markup may be aria-hidden="true".

I was able to reproduce the black rectangular VO cursor moving onto the separators with VO Right Arrow.

But when I move onto a separator, the link that I just moved away from retains the blue focus indicator that normally follows the tab key. When I press ENTER, the browser follows the link that has the focus indicator.

To me, this means that the separators don't receive focus.

See the attached video 3583516-5-breadcrumb.480p.mov.

VO Right Arrow also allows selection of lists, paragraphs, and arbitrary text nodes, even when they aren't part of the tab order and have focusable="false". I couldn't find any documentation for focusable="false".

See the attached video 3583516-5-arbitrary-text-elements.480p.mov.

Here's a test codepen.

Another idea

@rkoller noted in the Gin issue that this doesn't happen in Olivero.

I think it's because Olivero does this with just empty blocks that have two right-angle borders rotated slightly. Doing something like that would also be an option here (a single-sided border rotated slightly).

Olivero's CSS:

.breadcrumb__item {
    &:nth-child(n + 2)::before {
        display: inline-block;
        width: 0.5rem;
        height: 0.5rem;
        margin-inline: 1rem 1.25rem;
        content: "";
        transform: rotate(45deg);
        border-block-start: 2px solid var(--color--gray-45);
        border-inline-end: 2px solid var(--color--gray-45);
    }
}
mgifford’s picture

I like the idea of just reusing what we've already tested very well in Olivero.

mgifford’s picture

Issue summary: View changes

Initial patch to move to Olivero style breadcrumbs.

Note the shift to:

       @media (forced-colors: active) {
-        opacity: 1;
+        border-color: CanvasText;
       }

AI was used in the production of this patch.

mgifford’s picture

Status: Active » Needs review
angel_devoeted’s picture

Tested MR !16772 on Drupal 11.x. Visually, the breadcrumb separators appear correctly as chevrons (>). During keyboard navigation, tabbing moves focus exclusively through links (Home, Administration, etc.) and completely skips separators. Additionally, accessibility testing confirmed that screen readers ignore the separators and do not read them aloud. Everything works as expected!

kentr’s picture

Thanks @angel_devoeted.

Visually, the breadcrumb separators appear correctly as chevrons (>)

To me, chevrons are incorrect.

My suggestion in #5 was to adapt the technique from Olivero so that they appear as they do currently (as slashes with same size / positioning / spacing / color).

Using a single-sided border might do that (instead of a two-sided border that shows the full corner).

If they appear as chevrons instead of slashes, then my guess is that it would be considered a visual regression. That's up to the theme maintainers, though.

kentr’s picture

Status: Needs review » Needs work

To be more precise, the intention behind my suggestion was to adapt the technique from Olivero so that they appear as they do currently.

Anyway, the pipeline is failing. So back to Needs work for that.

mherchel changed the visibility of the branch 3583516-breadcrumb-separators-are to hidden.

mherchel changed the visibility of the branch 3583516-hide-breadcrumb-seprator-css to hidden.

mherchel changed the visibility of the branch main to hidden.

mherchel changed the visibility of the branch 3583516-Breadrumb-CSS to hidden.

mherchel changed the visibility of the branch 3583516-test to hidden.

mherchel’s picture

There's a number of issues wrong with the breadcrumbs CSS

  • There's unused selectors. Claro's .breadcrumb selector still exists, although its not in use. Currently in use is .gin-breadcrumb
  • There's unneeded specificity. The breadcrumbs do not exist within the toolbar, and do not need the :is(#extra-specificity-hack, [data-drupal-admin-styles]) { hack.
  • The slash doesn't flip for RTL

In addition, we can do an easier fix for removing it from the accessibility tree by doing a content: "/" / ""; The extra =/ ""; is like empty alt text for the content property. I manually tested this in VO with Chrome and Safari. Details on this are on MDN at https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/co...

Note I can't figure out how to make a new branch. I posted in Slack at https://drupal.slack.com/archives/CGKLP028K/p1788029852101539.

mherchel changed the visibility of the branch 3583516-test2 to hidden.

mherchel’s picture

Title: Breadcrumb separators are focusable » Breadcrumb separators are exposed to the accessibility tree
Issue summary: View changes

Updating IS

mherchel’s picture

Status: Needs work » Needs review

MR created. This should be good to go.

kentr’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

Tested before & after.

With the MR, VoiceOver does not select or announce the separators (as expected).

I'll upload a screencast tomorrow.

P.S. I like the branch name: 3583516-This-one-will-work :-).

kentr’s picture

Issue summary: View changes
StatusFileSize
new193.65 KB

Here's a screencast of VoiceOver in Edge with the MR, in dark mode.

mherchel’s picture

Status: Reviewed & tested by the community » Needs work
mherchel’s picture

Status: Needs work » Reviewed & tested by the community

Brought back up to date. Setting back to RTBC per #23

Note that there's some old Claro styles being removed. These were not in use because the namespace was gin-breadcrumb, however, now they're redundant and so are being removed.

godotislate’s picture

mherchel’s picture

Status: Reviewed & tested by the community » Needs work

Definitely not! Not sure what I was thinking :D

smustgrave made their first commit to this issue’s fork.

smustgrave’s picture

Issue summary: View changes
Status: Needs work » Reviewed & tested by the community

Hope it's okay I RTBC all I did was drop .gin- in line line.

amateescu’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Needs review

Reviewed and posted a few comments on the MR.

mherchel’s picture

@amateescu's comments are resolved or addressed. This should be ready!

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Feedback for this one appears to be addressed. Breadcrumbs appear to be working. Checked both regular and dark mode

kentr’s picture

The pipeline is failing.

Looks like a performance test failing on the asset size change. I'm looking into it.

I'm leaving at RTBC in case that decision was made in spite of the pipeline.

kentr’s picture

Pipeline is passing now.

catch made their first commit to this issue’s fork.

catch’s picture

Version: main » 11.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

This had a commit conflict on performance tests, rebasing also had a conflict on at least one previous commit, so I merged in main then updated the test from there.

Committed/pushed to main, thanks!

Moving to 11.x for backport.

  • catch committed 8dbb1309 on main
    fix: #3583516 Breadcrumb separators are exposed to the accessibility...

smustgrave’s picture

Status: Patch (to be ported) » Reviewed & tested by the community

Green backport.

  • godotislate committed b94ae96a on 11.x
    fix: #3583516 Breadcrumb separators are exposed to the accessibility...
godotislate’s picture

Status: Reviewed & tested by the community » Fixed

11.x MR diff checks out against the main commit, only difference is the performance test numbers.

Committed b94ae96 and pushed to 11.x. Thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.