mirror of
https://github.com/discourse/discourse.git
synced 2025-02-11 13:55:07 +00:00
Really fully authored by Jarek, I only made the PR :) The `DBreadcrumbItem` and `DBreadcrumbContainer` components introduced in 1239178f496cba5d864adb7c118b17902b8b72dc have some limitations, mainly that the container has no awareness of its items, so nothing that requires positional knowledge can be used. This is needed to use `aria-current` on the last breadcrumb item, see https://www.w3.org/WAI/ARIA/apg/patterns/breadcrumb/examples/breadcrumb/. We change `DBreadcrumbItem` to always be a link, removing the need for `LinkTo`. Then, we introduce a service to keep track of containers and items (since all items are rendered into all containers) and make the item itself responsible for registering to the service, and introduce the needed `aria-current` behaviour. --------- Co-authored-by: Jarek Radosz <jradosz@gmail.com>