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

[EuiHeaderBreadcrumbs] Breadcrumb changes announcement #7550

Closed
alexwizp opened this issue Mar 5, 2024 · 3 comments
Closed

[EuiHeaderBreadcrumbs] Breadcrumb changes announcement #7550

alexwizp opened this issue Mar 5, 2024 · 3 comments

Comments

@alexwizp
Copy link
Contributor

alexwizp commented Mar 5, 2024

Description

Before, we had a couple of accessibility (a11y) issues that did not announce route changes to screen readers. Some of our projects address this issue by relying on changes in EuiHeaderBreadcrumbs and announcing breadcrumb elements in reverse order. For example, this solution was utilized here and here.

Today @zinckiwi suggested an excellent idea: why not move this functionality inside EuiHeaderBreadcrumbs and add an additional flag to enable or disable this feature? This might help us avoid code duplication across projects and, furthermore, enhance the accessibility of the library.

From the API perspective, the EuiHeaderBreadcrumbs component can accept one more property, focusRegionOnTextChange (boolean), and encapsulate the required logic probably reusing EuiScreenReaderLive inside.

WCAG or Vendor Guidance

@cee-chen
Copy link
Contributor

Apologies if this answer is disappointing, but I consider this too prescriptive/opinionated for EUI and out of scope of our concerns (the same way that EUI is agnostic of app routing). We've given consumers the building blocks and accessibility tools/components to set up SPA route announcements, but specifying that breadcrumbs are the best way to do that is, in my opinion, a step too far for us.

The breadcrumb workaround I implemented in Kibana is in fact not my preferred approach - I would by far prefer that the window/page title to be what's announced/keyed off of - but I was hampered by the fact that Kibana plugins don't always update their window titles when they should, and breadcrumbs could be more relied on. However, it's not perfect in that several apps (that had to have one-off exceptions made for them) were not correctly updating breadcrumbs (or were updating them too often, leading to massive screen reader spam).

Again, I strongly consider this to be a consumer-level concern and not a design system/library one, and if needed consumers can create their own light wrapper around EuiHeaderBreadcrumbs if that is the architecture they prefer - but it's not one EUI specifically recommends.

@cee-chen cee-chen closed this as not planned Won't fix, can't repro, duplicate, stale Mar 11, 2024
@zinckiwi
Copy link
Contributor

No worries Cee, I encouraged Alexey to reach out just in the sense that we should so whenever something might have a broader application.

@cee-chen
Copy link
Contributor

Yes totally, no worries at all - we appreciate the suggestions and dialogue for sure (even if we don't end up using all of them!) Please do keep sending them our way!

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

No branches or pull requests

3 participants