Skip to content

Conversation

@MariaSolOs
Copy link
Contributor

Changes proposed in this pull request:

Replacing the aria-label attribute of the collapsed button of the breadcrumbs component to use aria-labelledby instead. This way the button references the popover's content as the element providing an accessible name.

The problem with the current aria-label is that it doesn't describe the state information of the button.

@changelog-app
Copy link

changelog-app bot commented Nov 25, 2025

Generate changelog in packages/core/changelog/@unreleased

Type (Select exactly one)

  • Feature (Adding new functionality)
  • Improvement (Improving existing functionality)
  • Fix (Fixing an issue with existing functionality)
  • Break (Creating a new major version by breaking public APIs)
  • Deprecation (Removing functionality in a non-breaking way)
  • Migration (Automatically moving data/functionality to a new system)

Description

fix(a11y): identify menu ID to breadcrumbs collapsed button

Check the box to generate changelog(s)

  • Generate changelog entry

@MariaSolOs MariaSolOs requested a review from a team November 25, 2025 21:25
@MariaSolOs MariaSolOs force-pushed the ms/collapsed-aria-labelledby branch from c825575 to a907df6 Compare November 25, 2025 21:27
@svc-palantir-github
Copy link

fix(a11y): identify menu ID to breadcrumbs collapsed button

Build artifact links for this commit: documentation | landing | table | demo

This is an automated comment from the deploy-preview CircleCI job.

>
<span
aria-label="collapsed breadcrumbs"
aria-labelledby={this.collapsedBreadcrumbsMenuId}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On first inspection, it seems a bit odd to me to label the collapse button based on the contents of the menu. Shouldn't the collapse menu button indicate the action that the user will take to expand the menu?

Screenshot 2025-11-26 at 13 56 01@2x

I would expect the Button test to read something like an action like "expand breadcrumbs" or "show paths"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it's a bit strange. I used the ... button from GitHub project dashboards as a reference here:
image

The button above has an aria-labelledby attribute that references the ID of the "More actions" tooltip. Since in this case we don't have such a tooltip shown on hover I found that the closest thing referencing the contents of the button was the menu itself, but yes that's not exactly what we want to communicate here.

@MariaSolOs MariaSolOs force-pushed the ms/collapsed-aria-labelledby branch from a907df6 to 1d89f83 Compare November 26, 2025 19:01
@svc-palantir-github
Copy link

fix(a11y): identify menu ID to breadcrumbs collapsed button

Build artifact links for this commit: documentation | landing | table | demo

This is an automated comment from the deploy-preview CircleCI job.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants